Sub-Picture Motion Vectors In Video Coding

ABSTRACT

A video coding mechanism includes receiving a bitstream comprising a current picture including a sub-picture coded according to inter-prediction. Coded blocks contain candidate motion vectors for a current block of the sub-picture. The coded blocks include a collocated block from a different picture. A candidate list of candidate motion vectors for the current block are derived by excluding collocated motion vectors from the candidate list when the collocated motion vectors are included in the collocated block, when the collocated motion vectors point outside of the sub-picture, and when a flag is set to indicate the sub-picture is treated as a picture. A current motion vector for the current block is determined from the candidate list of candidate motion vectors. The current block is decoded based on the current motion vector. The current block is forwarded for display as part of a decoded video sequence.

CROSS-REFERENCE TO RELATED APPLICATIONS

This patent application is a continuation of International ApplicationNo. PCT/US2020/022082, filed Mar. 11, 2020 by Ye-Kui Wang, et. al., andtitled “Sub-Picture Motion Vectors In Video Coding,” which claims thebenefit of U.S. Provisional Patent Application No. 62/816,751, filedMar. 11, 2019 by Ye-Kui Wang, et. al., and titled “Sub-Picture BasedVideo Coding,” and U.S. Provisional Patent Application No. 62/826,659,filed Mar. 29, 2019 by Ye-Kui Wang, et. al., and titled “Sub-PictureBased Video Coding,” which are hereby incorporated by reference.

TECHNICAL FIELD

The present disclosure is generally related to video coding, and isspecifically related to coding sub-pictures of pictures in video coding.

BACKGROUND

The amount of video data needed to depict even a relatively short videocan be substantial, which may result in difficulties when the data is tobe streamed or otherwise communicated across a communications networkwith limited bandwidth capacity. Thus, video data is generallycompressed before being communicated across modern daytelecommunications networks. The size of a video could also be an issuewhen the video is stored on a storage device because memory resourcesmay be limited. Video compression devices often use software and/orhardware at the source to code the video data prior to transmission orstorage, thereby decreasing the quantity of data needed to representdigital video images. The compressed data is then received at thedestination by a video decompression device that decodes the video data.With limited network resources and ever increasing demands of highervideo quality, improved compression and decompression techniques thatimprove compression ratio with little to no sacrifice in image qualityare desirable.

SUMMARY

In an embodiment, the disclosure includes a method implemented in adecoder, the method comprising: receiving, by a receiver of the decoder,a bitstream comprising a current picture including a sub-picture codedaccording to inter-prediction; obtaining, by the processor, a pluralityof coded blocks containing candidate motion vectors for a current blockof the sub-picture, the plurality of coded blocks including a collocatedblock from a different picture than the current picture; deriving, bythe processor, a candidate list of candidate motion vectors for thecurrent block by excluding collocated motion vectors from the candidatelist when the collocated motion vectors are included in the collocatedblock, when the collocated motion vectors point outside of thesub-picture, and when a flag is set to indicate the sub-picture istreated as a picture; determining, by the processor, a current motionvector for the current block from the candidate list of candidate motionvectors; and decoding, by the processor, the current block based on thecurrent motion vector. Inter-prediction may be performed according toone of several inter-prediction modes. Certain inter-prediction modesgenerate candidate lists of motion vector predictors at both the encoderand the decoder. This allows the encoder to signal a motion vector bysignaling the index from the candidate list instead of signaling theentire motion vector. Further, some systems encode sub-pictures forindependent extraction. This allows a current sub-picture to be decodedand displayed without decoding information from other sub-pictures. Thismay cause errors when a motion vector is employed that points outside ofthe sub-picture because the data pointed to by the motion vector may notbe decoded and hence may not be available. The present disclosureincludes is a flag that indicates a sub-picture should be treated as apicture. This flag is set to support separate extraction of thesub-picture. When the flag is set, the candidate motion vectors obtainedfrom a collocated block include only motion vectors that point insidethe sub-picture. Any motion vector predictors that point outside of thesub-picture are excluded. This ensures that motion vectors that pointoutside of the sub-picture are not selected and associated errors areavoided. A collocated block is a block from a different picture from thecurrent picture. Motion vector predictors from blocks in the currentpicture (non-collocated blocks) may point outside of the sub-picturebecause other processes, such as interpolation filters, may preventerrors for such motion vector predictors. Accordingly, the presentexample provides additional functionality to a video encoder/decoder(codec) by preventing errors when performing sub-picture extraction.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, further comprising obtaining, by the processor, theflag from a sequence parameter set (SPS), wherein the flag is denoted asa subpic_treated_aspic_flag[i], and wherein i is an index of thesub-picture.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the subpic_treated_as_pic_flag[i] is setequal to one to specify that an i-th sub-picture of each coded picturein a coded video sequence (CVS) is treated as a picture in a decodingprocess exclusive of in-loop filtering operations.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein deriving the candidate list of motionvectors for the current block is performed according to temporal lumamotion vector prediction.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein temporal luma motion vector prediction isperformed according to:

xColBr=xCb+cbWidth;

yColBr=yCb+cbHeight;

-   -   rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?        SubPicRightBoundaryPos: pic_width_in_luma_samples−1; and    -   botBoundaryPos=subpic_treated_aspic_flag[SubPicIdx]?        SubPicBotBoundaryPos: pic_height_in_luma_samples−1,        where xColBr and yColBR specify a location of the collocated        block, xCb and yCb specify a top left sample of the current        block relative to a top left sample of the current picture,        cbWidth is a width of the current block, cbHeight is a height of        the current block, SubPicRightBoundaryPos is a position of a        right boundary of the sub-picture, SubPicBotBoundaryPos is a        position of a bottom boundary of the sub-picture,        pic_widthin_luma_samples is a width of the current picture        measured in luma samples, pic_height_in_luma_samples is a height        of the current picture measured in luma samples, botBoundaryPos        is a computed position of the bottom boundary of the        sub-picture, rightBoundaryPos is a computed position of the        right boundary of the sub-picture, SubPicIdx is an index of the        sub-picture, and wherein collocated motion vectors are excluded        when yCb>>CtbLog2SizeY is not equal to yColBr>>CtbLog2SizeY, and        where CtbLog2SizeY indicates a size of a coding tree block.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the current block is a luma block of lumasamples.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the current motion vector is a temporalluma motion vector pointing to reference luma samples in a referenceblock, and wherein the current block is decoded based on the referenceluma samples.

In an embodiment, the disclosure includes a method implemented in anencoder, the method comprising: partitioning, by a processor of theencoder, a video sequence into a current picture, the current pictureinto a sub-picture, and the sub-picture into a current block;determining, by the processor, to encode the current block according tointer-prediction; obtaining, by the processor, a plurality of codedblocks containing candidate motion vectors for the current block of thesub-picture, the plurality of coded blocks including a collocated blockfrom a different picture than the current picture; deriving, by theprocessor, a candidate list of candidate motion vectors for the currentblock by excluding collocated motion vectors from the candidate listwhen the collocated motion vectors are included in the collocated block,when the collocated motion vectors point outside of the sub-picture, andwhen a flag is set to indicate the sub-picture is treated as a picture;selecting, by the processor, a current motion vector for the currentblock from the candidate list of candidate motion vectors; encoding, bythe processor, the current block into a bitstream based on the currentmotion vector; and storing, by a memory coupled to the processor, thebitstream for communication toward a decoder. Inter-prediction may beperformed according to one of several inter-prediction modes. Certaininter-prediction modes generate candidate lists of motion vectorpredictors at both the encoder and the decoder. This allows the encoderto signal a motion vector by signaling the index from the candidate listinstead of signaling the entire motion vector. Further, some systemsencode sub-pictures for independent extraction. This allows a currentsub-picture to be decoded and displayed without decoding informationfrom other sub-pictures. This may cause errors when a motion vector isemployed that points outside of the sub-picture because the data pointedto by the motion vector may not be decoded and hence may not beavailable. The present disclosure includes is a flag that indicates asub-picture should be treated as a picture. This flag is set to supportseparate extraction of the sub-picture. When the flag is set, thecandidate motion vectors obtained from a collocated block include onlymotion vectors that point inside the sub-picture. Any motion vectorpredictors that point outside of the sub-picture are excluded. Thisensures that motion vectors that point outside of the sub-picture arenot selected and associated errors are avoided. A collocated block is ablock from a different picture from the current picture. Motion vectorpredictors from blocks in the current picture (non-collocated blocks)may point outside of the sub-picture because other processes, such asinterpolation filters, may prevent errors for such motion vectorpredictors. Accordingly, the present example provides additionalfunctionality to a video encoder/decoder (codec) by preventing errorswhen performing sub-picture extraction.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, further comprising encoding, by the processor, theflag into a SPS in the bitstream, wherein the flag is denoted as asubpic_treated_aspic_flag[i], and wherein i is an index of thesub-picture.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the subpic_treated_as_pic_flag[i] is setequal to one to specify that an i-th sub-picture of each coded picturein a CVS is treated as a picture in an encoding process exclusive ofin-loop filtering operations.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein deriving the candidate list of motionvectors for the current block is performed according to temporal lumamotion vector prediction.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein temporal luma motion vector prediction isperformed according to:

xColBr=xCb+cbWidth;

yColBr=yCb+cbHeight;

-   -   rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?        SubPicRightBoundaryPos: pic_width_in_luma_samples−1; and    -   botBoundaryPos=subpic_treated_aspic_flag[SubPicIdx]?        SubPicBotBoundaryPos: pic_height_in_luma_samples−1,        where xColBr and yColBR specify a location of the collocated        block, xCb and yCb specify a top left sample of the current        block relative to a top left sample of the current picture,        cbWidth is a width of the current block, cbHeight is a height of        the current block, SubPicRightBoundaryPos is a position of a        right boundary of the sub-picture, SubPicBotBoundaryPos is a        position of a bottom boundary of the sub-picture,        pic_widthin_luma_samples is a width of the current picture        measured in luma samples, pic_height_in_luma_samples is a height        of the current picture measured in luma samples, botBoundaryPos        is a computed position of the bottom boundary of the        sub-picture, rightBoundaryPos is a computed position of the        right boundary of the sub-picture, SubPicIdx is an index of the        sub-picture, and wherein collocated motion vectors are excluded        when yCb>>CtbLog2SizeY is not equal to yColBr>>CtbLog2SizeY, and        where CtbLog2SizeY indicates a size of a coding tree block.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the current block is a luma block of lumasamples.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the current motion vector is a temporalluma motion vector pointing to reference luma samples in a referenceblock, and wherein the current block is encoded based on the referenceluma samples.

In an embodiment, the disclosure includes a video coding devicecomprising: a processor, a receiver coupled to the processor, a memorycoupled to the processor, and a transmitter coupled to the processor,wherein the processor, receiver, memory, and transmitter are configuredto perform the method of any of the preceding aspects.

In an embodiment, the disclosure includes a non-transitory computerreadable medium comprising a computer program product for use by a videocoding device, the computer program product comprising computerexecutable instructions stored on the non-transitory computer readablemedium such that when executed by a processor cause the video codingdevice to perform the method of any of the preceding aspects.

In an embodiment, the disclosure includes a decoder comprising: areceiving means for receiving a bitstream comprising a current pictureincluding a sub-picture coded according to inter-prediction; anobtaining means for obtaining a plurality of coded blocks containingcandidate motion vectors for a current block of the sub-picture, theplurality of coded blocks including a collocated block from a differentpicture than the current picture; a deriving means for deriving acandidate list of candidate motion vectors for the current block byexcluding collocated motion vectors from the candidate list when thecollocated motion vectors are included in the collocated block, when thecollocated motion vectors point outside of the sub-picture, and when aflag is set to indicate the sub-picture is treated as a picture; adetermining means for determining a current motion vector for thecurrent block from the candidate list of candidate motion vectors; adecoding means for decoding the current block based on the currentmotion vector; and a forwarding means for forwarding the current blockfor display as part of a decoded video sequence.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the decoder is further configured toperform the method of any of the preceding aspects.

In an embodiment, the disclosure includes an encoder comprising: apartitioning means for partitioning a video sequence into a currentpicture, the current picture into a sub-picture, and the sub-pictureinto a current block; a determining means for determining to encode thecurrent block according to inter-prediction; an obtaining means forobtaining a plurality of coded blocks containing candidate motionvectors for the current block of the sub-picture, the plurality of codedblocks including a collocated block from a different picture than thecurrent picture; a deriving means for deriving a candidate list ofcandidate motion vectors for the current block by excluding collocatedmotion vectors from the candidate list when the collocated motionvectors are included in the collocated block, when the collocated motionvectors point outside of the sub-picture, and when a flag is set toindicate the sub-picture is treated as a picture; a selecting means forselecting a current motion vector for the current block from thecandidate list of candidate motion vectors; an encoding means forencoding the current block into a bitstream based on the current motionvector; and a storing means for storing the bitstream for communicationtoward a decoder.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the encoder is further configured toperform the method of any of the preceding aspects.

Optionally, in any of the preceding aspects, another implementation ofthe aspect provides, wherein the encoder is further configured toperform the method of any of the preceding aspects.

For the purpose of clarity, any one of the foregoing embodiments may becombined with any one or more of the other foregoing embodiments tocreate a new embodiment within the scope of the present disclosure.

These and other features will be more clearly understood from thefollowing detailed description taken in conjunction with theaccompanying drawings and claims.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of this disclosure, reference is nowmade to the following brief description, taken in connection with theaccompanying drawings and detailed description, wherein like referencenumerals represent like parts.

FIG. 1 is a flowchart of an example method of coding a video signal.

FIG. 2 is a schematic diagram of an example coding and decoding (codec)system for video coding.

FIG. 3 is a schematic diagram illustrating an example video encoder.

FIG. 4 is a schematic diagram illustrating an example video decoder.

FIG. 5A is a schematic diagram illustrating an example picturepartitioned into sub-pictures.

FIG. 5B is a schematic diagram illustrating an example sub-picturepartitioned into slices.

FIG. 5C is a schematic diagram illustrating an example slice partitionedinto tiles.

FIG. 5D is a schematic diagram illustrating an example slice partitionedinto coding tree units (CTUs).

FIG. 6 is a schematic diagram illustrating an example of unidirectionalinter-prediction.

FIG. 7 is a schematic diagram illustrating an example of bidirectionalinter-prediction.

FIG. 8 is a schematic diagram illustrating an example of coding acurrent block based on candidate motion vectors from adjacent codedblocks.

FIG. 9 is a schematic diagram illustrating an example pattern fordetermining a candidate list of motion vectors.

FIG. 10 is a block diagram illustrating an example in-loop filter.

FIG. 11 is a schematic diagram illustrating an example bitstreamcontaining coding tool parameters to support decoding a sub-picture of apicture.

FIG. 12 is a schematic diagram of an example video coding device.

FIG. 13 is a flowchart of an example method of encoding a video sequenceinto a bitstream by excluding collocated motion vectors when asub-picture is treated as a picture.

FIG. 14 is a flowchart of an example method of decoding a video sequencefrom a bitstream by excluding collocated motion vectors when asub-picture is treated as a picture.

FIG. 15 is a schematic diagram of an example system for coding a videosequence of images in a bitstream by excluding collocated motion vectorswhen a sub-picture is treated as a picture.

DETAILED DESCRIPTION

It should be understood at the outset that although an illustrativeimplementation of one or more embodiments are provided below, thedisclosed systems and/or methods may be implemented using any number oftechniques, whether currently known or in existence. The disclosureshould in no way be limited to the illustrative implementations,drawings, and techniques illustrated below, including the exemplarydesigns and implementations illustrated and described herein, but may bemodified within the scope of the appended claims along with their fullscope of equivalents.

The following acronyms are used herein, Adaptive Loop Filter (ALF),Coding Tree Block (CTB), Coding Tree Unit (CTU), Coding Unit (CU), CodedVideo Sequence (CVS), Joint Video Experts Team (JVET),Motion-Constrained Tile Set (MCTS), Maximum Transfer Unit (MTU), NetworkAbstraction Layer (NAL), Picture Order Count (POC), Raw Byte SequencePayload (RBSP), Sample Adaptive Offset (SAO), Sequence Parameter Set(SPS), Temporal Motion Vector Prediction (TMVP), Versatile Video Coding(VVC), and Working Draft (WD).

Many video compression techniques can be employed to reduce the size ofvideo files with minimal loss of data. For example, video compressiontechniques can include performing spatial (e.g., intra-picture)prediction and/or temporal (e.g., inter-picture) prediction to reduce orremove data redundancy in video sequences. For block-based video coding,a video slice (e.g., a video picture or a portion of a video picture)may be partitioned into video blocks, which may also be referred to astreeblocks, coding tree blocks (CTBs), coding tree units (CTUs), codingunits (CUs), and/or coding nodes. Video blocks in an intra-coded (I)slice of a picture are coded using spatial prediction with respect toreference samples in neighboring blocks in the same picture. Videoblocks in an inter-coded unidirectional prediction (P) or bidirectionalprediction (B) slice of a picture may be coded by employing spatialprediction with respect to reference samples in neighboring blocks inthe same picture or temporal prediction with respect to referencesamples in other reference pictures. Pictures may be referred to asframes and/or images, and reference pictures may be referred to asreference frames and/or reference images. Spatial or temporal predictionresults in a predictive block representing an image block. Residual datarepresents pixel differences between the original image block and thepredictive block. Accordingly, an inter-coded block is encoded accordingto a motion vector that points to a block of reference samples formingthe predictive block and the residual data indicating the differencebetween the coded block and the predictive block. An intra-coded blockis encoded according to an intra-coding mode and the residual data. Forfurther compression, the residual data may be transformed from the pixeldomain to a transform domain. These result in residual transformcoefficients, which may be quantized. The quantized transformcoefficients may initially be arranged in a two-dimensional array. Thequantized transform coefficients may be scanned in order to produce aone-dimensional vector of transform coefficients. Entropy coding may beapplied to achieve even more compression. Such video compressiontechniques are discussed in greater detail below.

To ensure an encoded video can be accurately decoded, video is encodedand decoded according to corresponding video coding standards. Videocoding standards include International Telecommunication Union (ITU)Standardization Sector (ITU-T) H.261, International Organization forStandardization/International Electrotechnical Commission (ISO/IEC)Motion Picture Experts Group (MPEG)-1 Part 2, ITU-T H.262 or ISO/IECMPEG-2 Part 2, ITU-T H.263, ISO/IEC MPEG-4 Part 2, Advanced Video Coding(AVC), also known as ITU-T H.264 or ISO/IEC MPEG-4 Part 10, and HighEfficiency Video Coding (HEVC), also known as ITU-T H.265 or MPEG-H Part2. AVC includes extensions such as Scalable Video Coding (SVC),Multiview Video Coding (MVC) and Multiview Video Coding plus Depth(MVC+D), and three dimensional (3D) AVC (3D-AVC). HEVC includesextensions such as Scalable HEVC (SHVC), Multiview HEVC (MV-HEVC), and3D HEVC (3D-HEVC). The joint video experts team (JVET) of ITU-T andISO/IEC has begun developing a video coding standard referred to asVersatile Video Coding (VVC). VVC is included in a Working Draft (WD),which includes JVET-M1001-v6 which provides an algorithm description, anencoder-side description of the VVC WD, and reference software.

In order to code a video image, the image is first partitioned, and thepartitions are coded into a bitstream. Various picture partitioningschemes are available. For example, an image can be partitioned intoregular slices, dependent slices, tiles, and/or according to WavefrontParallel Processing (WPP). For simplicity, HEVC restricts encoders sothat only regular slices, dependent slices, tiles, WPP, and combinationsthereof can be used when partitioning a slice into groups of CTBs forvideo coding. Such partitioning can be applied to support MaximumTransfer Unit (MTU) size matching, parallel processing, and reducedend-to-end delay. MTU denotes the maximum amount of data that can betransmitted in a single packet. If a packet payload is in excess of theMTU, that payload is split into two packets through a process calledfragmentation.

A regular slice, also referred to simply as a slice, is a partitionedportion of an image that can be reconstructed independently from otherregular slices within the same picture, notwithstanding someinterdependencies due to loop filtering operations. Each regular sliceis encapsulated in its own Network Abstraction Layer (NAL) unit fortransmission. Further, in-picture prediction (intra sample prediction,motion information prediction, coding mode prediction) and entropycoding dependency across slice boundaries may be disabled to supportindependent reconstruction. Such independent reconstruction supportsparallelization. For example, regular slice based parallelizationemploys minimal inter-processor or inter-core communication. However, aseach regular slice is independent, each slice is associated with aseparate slice header. The use of regular slices can incur a substantialcoding overhead due to the bit cost of the slice header for each sliceand due to the lack of prediction across the slice boundaries. Further,regular slices may be employed to support matching for MTU sizerequirements. Specifically, as a regular slice is encapsulated in aseparate NAL unit and can be independently coded, each regular sliceshould be smaller than the MTU in MTU schemes to avoid breaking theslice into multiple packets. As such, the goal of parallelization andthe goal of MTU size matching may place contradicting demands to a slicelayout in a picture.

Dependent slices are similar to regular slices, but have shortened sliceheaders and allow partitioning of the image treeblock boundaries withoutbreaking in-picture prediction. Accordingly, dependent slices allow aregular slice to be fragmented into multiple NAL units, which providesreduced end-to-end delay by allowing a part of a regular slice to besent out before the encoding of the entire regular slice is complete.

A tile is a partitioned portion of an image created by horizontal andvertical boundaries that create columns and rows of tiles. Tiles may becoded in raster scan order (right to left and top to bottom). The scanorder of CTBs is local within a tile. Accordingly, CTBs in a first tileare coded in raster scan order, before proceeding to the CTBs in thenext tile. Similar to regular slices, tiles break in-picture predictiondependencies as well as entropy decoding dependencies. However, tilesmay not be included into individual NAL units, and hence tiles may notbe used for MTU size matching. Each tile can be processed by oneprocessor/core, and the inter-processor/inter-core communicationemployed for in-picture prediction between processing units decodingneighboring tiles may be limited to conveying a shared slice header(when adjacent tiles are in the same slice), and performing loopfiltering related sharing of reconstructed samples and metadata. Whenmore than one tile is included in a slice, the entry point byte offsetfor each tile other than the first entry point offset in the slice maybe signaled in the slice header. For each slice and tile, at least oneof the following conditions should be fulfilled: 1) all coded treeblocksin a slice belong to the same tile; and 2) all coded treeblocks in atile belong to the same slice.

In WPP, the image is partitioned into single rows of CTBs. Entropydecoding and prediction mechanisms may use data from CTBs in other rows.Parallel processing is made possible through parallel decoding of CTBrows. For example, a current row may be decoded in parallel with apreceding row. However, decoding of the current row is delayed from thedecoding process of the preceding rows by two CTBs. This delay ensuresthat data related to the CTB above and the CTB above and to the right ofthe current CTB in the current row is available before the current CTBis coded. This approach appears as a wavefront when representedgraphically. This staggered start allows for parallelization with up toas many processors/cores as the image contains CTB rows. Becausein-picture prediction between neighboring treeblock rows within apicture is permitted, the inter-processor/inter-core communication toenable in-picture prediction can be substantial. The WPP partitioningdoes consider NAL unit sizes. Hence, WPP does not support MTU sizematching. However, regular slices can be used in conjunction with WPP,with certain coding overhead, to implement MTU size matching as desired.

Tiles may also include motion constrained tile sets. A motionconstrained tile set (MCTS) is a tile set designed such that associatedmotion vectors are restricted to point to full-sample locations insidethe MCTS and to fractional-sample locations that require onlyfull-sample locations inside the MCTS for interpolation. Further, theusage of motion vector candidates for temporal motion vector predictionderived from blocks outside the MCTS is disallowed. This way, each MCTSmay be independently decoded without the existence of tiles not includedin the MCTS. Temporal MCTSs supplemental enhancement information (SEI)messages may be used to indicate the existence of MCTSs in the bitstreamand signal the MCTSs. The MCTSs SEI message provides supplementalinformation that can be used in the MCTS sub-bitstream extraction(specified as part of the semantics of the SEI message) to generate aconforming bitstream for an MCTS set. The information includes a numberof extraction information sets, each defining a number of MCTS sets andcontaining raw bytes sequence payload (RBSP) bytes of the replacementvideo parameter set (VPSs), sequence parameter sets (SPSs), and pictureparameter sets (PPSs) to be used during the MCTS sub-bitstreamextraction process. When extracting a sub-bitstream according to theMCTS sub-bitstream extraction process, parameter sets (VPSs, SPSs, andPPSs) may be rewritten or replaced, and slice headers may updatedbecause one or all of the slice address related syntax elements(including first_slice_segment_inpic_flag and slice_segment_address) mayemploy different values in the extracted sub-bitstream.

Pictures may also be partitioned into one or more sub-pictures.Partitioning a picture into a sub-picture may allow different portionsof a picture to be treated differently from a coding standpoint. Forexample, a sub-picture can be extracted and displayed without extractingthe other sub-pictures. As another example, different sub-pictures canbe displayed at different resolutions, repositioned relative to eachother (e.g., in teleconferencing applications), or otherwise coded asseparate pictures even though the sub-pictures collectively contain datafrom a common picture.

An example implementation of sub-pictures is as follows. A picture canbe partitioned into one or more sub-pictures. A sub-picture is arectangular or square set of slices/tile groups that begin with aslice/tile group that has an address equal to zero. Each sub-picture mayrefer to a different PPS, and hence each sub-picture may employ adifferent partitioning mechanism. Sub-pictures may be treated likepictures in the decoding process. A current reference picture used fordecoding a current sub-picture may be generated by extracting an areacollocating with the current sub-picture from the reference pictures inthe decoded picture buffer. The extracted area may be a decodedsub-picture, and hence inter-prediction may take place betweensub-pictures of the same size and the same location within the picture.A tile group may be a sequence of tiles in tile raster scan of asub-picture. The following may be derived to determine the location of asub-picture in a picture. Each sub-picture may be included in the nextunoccupied location in CTU raster scan order within a picture that islarge enough to fit the sub-picture within the picture boundaries.

The sub-picture schemes employed by various video coding systems includevarious problems that reduce coding efficiency and/or functionality. Thepresent disclosure includes various solutions to such problems. In afirst example problem, inter-prediction may be performed according toone of several inter-prediction modes. Certain inter-prediction modesgenerate candidate lists of motion vector predictors at both the encoderand the decoder. This allows the encoder to signal a motion vector bysignaling the index from the candidate list instead of signaling theentire motion vector. Further, some systems encode sub-pictures forindependent extraction. This allows a current sub-picture to be decodedand displayed without decoding information from other sub-pictures. Thismay cause errors when a motion vector is employed that points outside ofthe sub-picture because the data pointed to by the motion vector may notbe decoded and hence may not be available.

Accordingly, in a first example, disclosed herein is a flag thatindicates a sub-picture should be treated as a picture. This flag is setto support separate extraction of the sub-picture. When the flag is set,the motion vector predictors obtained from a collocated block includeonly motion vectors that point inside the sub-picture. Any motion vectorpredictors that point outside of the sub-picture are excluded. Thisensures that motion vectors that point outside of the sub-picture arenot selected and associated errors are avoided. A collocated block is ablock from a different picture from the current picture. Motion vectorpredictors from blocks in the current picture (non-collocated blocks)may point outside of the sub-picture because other processes, such asinterpolation filters, may prevent errors for such motion vectorpredictors. Accordingly, the present example provides additionalfunctionality to a video encoder/decoder (codec) by preventing errorswhen performing sub-picture extraction.

In a second example, disclosed herein is a flag that indicates asub-picture should be treated as a picture. When a current sub-pictureis treated like a picture, the current sub-picture should be extractedwithout reference to other sub-pictures. Specifically, the presentexample employs a clipping function that is applied when applyinginterpolation filters. This clipping function ensures that theinterpolation filter does not rely on data from adjacent sub-pictures inorder to maintain separation between the sub-pictures to supportseparate extraction. As such, the clipping function is applied when theflag is set and a motion vector points outside of the currentsub-picture. The interpolation filter is then applied to the results ofthe clipping function. Accordingly, the present example providesadditional functionality to a video codec by preventing errors whenperforming sub-picture extraction. As such, the first example and thesecond example address the first example problem.

In a second example problem, video coding systems partition picturesinto sub-pictures, slices, tiles, and/or coding tree units, which arethen partitioned into blocks. Such blocks are then encoded fortransmission toward a decoder. Decoding such blocks may result in adecoded image that contains various types of noise. To correct suchissues, video coding systems may apply various filters across blockboundaries. These filters can remove blocking, quantization noise, andother undesirable coding artifacts. As noted above, some systems encodesub-pictures for independent extraction. This allows a currentsub-picture to be decoded and displayed without decoding informationfrom other sub-pictures. In such systems, the sub-picture may bepartitioned into blocks for encoding. As such, block boundaries alongthe sub-picture edge may align with sub-picture boundaries. In somecases, the block boundaries may also align with tile boundaries. Filtersmay be applied across such block boundaries, and hence applied acrosssub-picture boundaries and/or tile boundaries. This may cause errorswhen a current sub-picture is independently extracted as the filteringprocess may operate in an unexpected manner when data from an adjacentsub-picture is unavailable.

In a third example, disclosed herein is a flag that controls filteringat the sub-picture level. When the flag is set for a sub-picture,filters can be applied across the sub-picture boundary. When the flag isnot set, filters are not applied across the sub-picture boundary. Inthis way, the filters can be turned off for sub-pictures that areencoded for separate extraction or turned on for sub-pictures that areencoded for display as a group. As such, the present example providesadditional functionality to a video codec by preventing filter relatederrors when performing sub-picture extraction.

In a fourth example, disclosed herein is a flag that can be set tocontrol filtering at the tile level. When the flag is set for a tile,filters can be applied across the tile boundary. When the flag is notset, filters are not applied across the tile boundary. In this way, thefilters can be turned off or on for use at tile boundaries (e.g., whilecontinuing to filter the internal portions of the tile). Accordingly,the present example provides additional functionality to a video codecby supporting selective filtering across tile boundaries. As such, thethird example and the fourth example address the second example problem.

In a third example problem, video coding systems may partition a pictureinto sub-pictures. This allows different sub-pictures to be treateddifferently when coding the video. For example, sub-pictures can beseparately extracted and displayed, resized independently based onapplication level changes, etc. In some cases, sub-pictures may becreated by partitioning a picture into tiles and assigning the tiles tothe sub-pictures. Some video coding systems describe the sub-pictureboundaries in terms of the tiles included in the sub-picture. However,tiling schemes may not be employed in some pictures. Accordingly, suchboundary descriptions may limit usage of sub-pictures to picturesemploying tiles.

In a fifth example, disclosed herein is a mechanism for signalingsub-picture boundaries in terms of CTBs and/or CTUs. Specifically, thewidth and height of a sub-picture can be signaled in units of CTBs.Also, the position of the top left CTU of the sub-picture can besignaled as an offset from the top left CTU of the picture as measuredin CTBs. CTU and CTB sizes may be set to a predetermined value.Accordingly, signaling the sub-picture dimensions and position in termsof CTBs and CTUs provides sufficient information for a decoder toposition the sub-picture for display. This allows sub-pictures to beemployed even when tiles are not employed. Also, this signalingmechanism both avoids complexity and can be coded using relatively fewbits. As such, the present example provides additional functionality toa video codec by allowing sub-pictures to be employed independently oftiles. Further, the present example increases coding efficiency, andhence reduces usage of processor, memory, and/or network resources atthe encoder and/or decoder. As such, the fifth example addresses thethird example problem.

In a fourth example problem, a picture can be partitioned into aplurality of slices for encoding. In some video coding systems, theslices are addressed based on their position relative to the picture.Still other video coding systems employ the concept of sub-pictures. Asnoted above, a sub-picture can be treated differently from othersub-pictures from a coding perspective. For example, a sub-picture canbe extracted and displayed independently of other sub-pictures. In sucha case, the slice addresses that are generated based on picture positionmay cease to operate properly as a significant number of the expectedslice addresses are omitted. Some video coding systems address thisissue by dynamically rewriting slice headers upon request to changeslice addresses to support sub-picture extraction. Such a process can beresource intensive, as this process may occur each time a user requeststo view the sub-picture.

In a sixth example, disclosed herein are slices that are addressedrelative to the sub-picture that contains the slice. For example, theslice header may include a sub-picture identifier (ID) and an address ofeach slice included in the sub-picture. Further, a sequence parameterset (SPS) may contain dimensions of the sub-picture that may bereferenced by the sub-picture ID. Accordingly, the slice header need notbe rewritten when separate extraction of the sub-picture is requested.The slice header and SPS contain sufficient information to supportpositioning the slices in the sub-picture for display. As such, thepresent example increases coding efficiency and/or avoids redundantrewriting of the slice header, and hence reduces usage of processor,memory, and/or network resources at the encoder and/or decoder.Accordingly, the sixth example addresses the fourth example problem.

FIG. 1 is a flowchart of an example operating method 100 of coding avideo signal. Specifically, a video signal is encoded at an encoder. Theencoding process compresses the video signal by employing variousmechanisms to reduce the video file size. A smaller file size allows thecompressed video file to be transmitted toward a user, while reducingassociated bandwidth overhead. The decoder then decodes the compressedvideo file to reconstruct the original video signal for display to anend user. The decoding process generally mirrors the encoding process toallow the decoder to consistently reconstruct the video signal.

At step 101, the video signal is input into the encoder. For example,the video signal may be an uncompressed video file stored in memory. Asanother example, the video file may be captured by a video capturedevice, such as a video camera, and encoded to support live streaming ofthe video. The video file may include both an audio component and avideo component. The video component contains a series of image framesthat, when viewed in a sequence, gives the visual impression of motion.The frames contain pixels that are expressed in terms of light, referredto herein as luma components (or luma samples), and color, which isreferred to as chroma components (or color samples). In some examples,the frames may also contain depth values to support three dimensionalviewing.

At step 103, the video is partitioned into blocks. Partitioning includessubdividing the pixels in each frame into square and/or rectangularblocks for compression. For example, in High Efficiency Video Coding(HEVC) (also known as H.265 and MPEG-H Part 2) the frame can first bedivided into coding tree units (CTUs), which are blocks of a predefinedsize (e.g., sixty-four pixels by sixty-four pixels). The CTUs containboth luma and chroma samples. Coding trees may be employed to divide theCTUs into blocks and then recursively subdivide the blocks untilconfigurations are achieved that support further encoding. For example,luma components of a frame may be subdivided until the individual blockscontain relatively homogenous lighting values. Further, chromacomponents of a frame may be subdivided until the individual blockscontain relatively homogenous color values. Accordingly, partitioningmechanisms vary depending on the content of the video frames.

At step 105, various compression mechanisms are employed to compress theimage blocks partitioned at step 103. For example, inter-predictionand/or intra-prediction may be employed. Inter-prediction is designed totake advantage of the fact that objects in a common scene tend to appearin successive frames. Accordingly, a block depicting an object in areference frame need not be repeatedly described in adjacent frames.Specifically, an object, such as a table, may remain in a constantposition over multiple frames. Hence the table is described once andadjacent frames can refer back to the reference frame. Pattern matchingmechanisms may be employed to match objects over multiple frames.Further, moving objects may be represented across multiple frames, forexample due to object movement or camera movement. As a particularexample, a video may show an automobile that moves across the screenover multiple frames. Motion vectors can be employed to describe suchmovement. A motion vector is a two-dimensional vector that provides anoffset from the coordinates of an object in a frame to the coordinatesof the object in a reference frame. As such, inter-prediction can encodean image block in a current frame as a set of motion vectors indicatingan offset from a corresponding block in a reference frame.

Intra-prediction encodes blocks in a common frame. Intra-predictiontakes advantage of the fact that luma and chroma components tend tocluster in a frame. For example, a patch of green in a portion of a treetends to be positioned adjacent to similar patches of green.Intra-prediction employs multiple directional prediction modes (e.g.,thirty-three in HEVC), a planar mode, and a direct current (DC) mode.The directional modes indicate that a current block is similar/the sameas samples of a neighbor block in a corresponding direction. Planar modeindicates that a series of blocks along a row/column (e.g., a plane) canbe interpolated based on neighbor blocks at the edges of the row. Planarmode, in effect, indicates a smooth transition of light/color across arow/column by employing a relatively constant slope in changing values.DC mode is employed for boundary smoothing and indicates that a block issimilar/the same as an average value associated with samples of all theneighbor blocks associated with the angular directions of thedirectional prediction modes. Accordingly, intra-prediction blocks canrepresent image blocks as various relational prediction mode valuesinstead of the actual values. Further, inter-prediction blocks canrepresent image blocks as motion vector values instead of the actualvalues. In either case, the prediction blocks may not exactly representthe image blocks in some cases. Any differences are stored in residualblocks. Transforms may be applied to the residual blocks to furthercompress the file.

At step 107, various filtering techniques may be applied. In HEVC, thefilters are applied according to an in-loop filtering scheme. The blockbased prediction discussed above may result in the creation of blockyimages at the decoder. Further, the block based prediction scheme mayencode a block and then reconstruct the encoded block for later use as areference block. The in-loop filtering scheme iteratively applies noisesuppression filters, de-blocking filters, adaptive loop filters, andsample adaptive offset (SAO) filters to the blocks/frames. These filtersmitigate such blocking artifacts so that the encoded file can beaccurately reconstructed. Further, these filters mitigate artifacts inthe reconstructed reference blocks so that artifacts are less likely tocreate additional artifacts in subsequent blocks that are encoded basedon the reconstructed reference blocks.

Once the video signal has been partitioned, compressed, and filtered,the resulting data is encoded in a bitstream at step 109. The bitstreamincludes the data discussed above as well as any signaling data desiredto support proper video signal reconstruction at the decoder. Forexample, such data may include partition data, prediction data, residualblocks, and various flags providing coding instructions to the decoder.The bitstream may be stored in memory for transmission toward a decoderupon request. The bitstream may also be broadcast and/or multicasttoward a plurality of decoders. The creation of the bitstream is aniterative process. Accordingly, steps 101, 103, 105, 107, and 109 mayoccur continuously and/or simultaneously over many frames and blocks.The order shown in FIG. 1 is presented for clarity and ease ofdiscussion, and is not intended to limit the video coding process to aparticular order.

The decoder receives the bitstream and begins the decoding process atstep 111. Specifically, the decoder employs an entropy decoding schemeto convert the bitstream into corresponding syntax and video data. Thedecoder employs the syntax data from the bitstream to determine thepartitions for the frames at step 111. The partitioning should match theresults of block partitioning at step 103. Entropy encoding/decoding asemployed in step 111 is now described. The encoder makes many choicesduring the compression process, such as selecting block partitioningschemes from several possible choices based on the spatial positioningof values in the input image(s). Signaling the exact choices may employa large number of bins. As used herein, a bin is a binary value that istreated as a variable (e.g., a bit value that may vary depending oncontext). Entropy coding allows the encoder to discard any options thatare clearly not viable for a particular case, leaving a set of allowableoptions. Each allowable option is then assigned a code word. The lengthof the code words is based on the number of allowable options (e.g., onebin for two options, two bins for three to four options, etc.) Theencoder then encodes the code word for the selected option. This schemereduces the size of the code words as the code words are as big asdesired to uniquely indicate a selection from a small sub-set ofallowable options as opposed to uniquely indicating the selection from apotentially large set of all possible options. The decoder then decodesthe selection by determining the set of allowable options in a similarmanner to the encoder. By determining the set of allowable options, thedecoder can read the code word and determine the selection made by theencoder.

At step 113, the decoder performs block decoding. Specifically, thedecoder employs reverse transforms to generate residual blocks. Then thedecoder employs the residual blocks and corresponding prediction blocksto reconstruct the image blocks according to the partitioning. Theprediction blocks may include both intra-prediction blocks andinter-prediction blocks as generated at the encoder at step 105. Thereconstructed image blocks are then positioned into frames of areconstructed video signal according to the partitioning data determinedat step 111. Syntax for step 113 may also be signaled in the bitstreamvia entropy coding as discussed above.

At step 115, filtering is performed on the frames of the reconstructedvideo signal in a manner similar to step 107 at the encoder. Forexample, noise suppression filters, de-blocking filters, adaptive loopfilters, and SAO filters may be applied to the frames to remove blockingartifacts. Once the frames are filtered, the video signal can be outputto a display at step 117 for viewing by an end user.

FIG. 2 is a schematic diagram of an example coding and decoding (codec)system 200 for video coding. Specifically, codec system 200 providesfunctionality to support the implementation of operating method 100.Codec system 200 is generalized to depict components employed in both anencoder and a decoder. Codec system 200 receives and partitions a videosignal as discussed with respect to steps 101 and 103 in operatingmethod 100, which results in a partitioned video signal 201. Codecsystem 200 then compresses the partitioned video signal 201 into a codedbitstream when acting as an encoder as discussed with respect to steps105, 107, and 109 in method 100. When acting as a decoder, codec system200 generates an output video signal from the bitstream as discussedwith respect to steps 111, 113, 115, and 117 in operating method 100.The codec system 200 includes a general coder control component 211, atransform scaling and quantization component 213, an intra-pictureestimation component 215, an intra-picture prediction component 217, amotion compensation component 219, a motion estimation component 221, ascaling and inverse transform component 229, a filter control analysiscomponent 227, an in-loop filters component 225, a decoded picturebuffer component 223, and a header formatting and context adaptivebinary arithmetic coding (CABAC) component 231. Such components arecoupled as shown. In FIG. 2, black lines indicate movement of data to beencoded/decoded while dashed lines indicate movement of control datathat controls the operation of other components. The components of codecsystem 200 may all be present in the encoder. The decoder may include asubset of the components of codec system 200. For example, the decodermay include the intra-picture prediction component 217, the motioncompensation component 219, the scaling and inverse transform component229, the in-loop filters component 225, and the decoded picture buffercomponent 223. These components are now described.

The partitioned video signal 201 is a captured video sequence that hasbeen partitioned into blocks of pixels by a coding tree. A coding treeemploys various split modes to subdivide a block of pixels into smallerblocks of pixels. These blocks can then be further subdivided intosmaller blocks. The blocks may be referred to as nodes on the codingtree. Larger parent nodes are split into smaller child nodes. The numberof times a node is subdivided is referred to as the depth of thenode/coding tree. The divided blocks can be included in coding units(CUs) in some cases. For example, a CU can be a sub-portion of a CTUthat contains a luma block, red difference chroma (Cr) block(s), and ablue difference chroma (Cb) block(s) along with corresponding syntaxinstructions for the CU. The split modes may include a binary tree (BT),triple tree (TT), and a quad tree (QT) employed to partition a node intotwo, three, or four child nodes, respectively, of varying shapesdepending on the split modes employed. The partitioned video signal 201is forwarded to the general coder control component 211, the transformscaling and quantization component 213, the intra-picture estimationcomponent 215, the filter control analysis component 227, and the motionestimation component 221 for compression.

The general coder control component 211 is configured to make decisionsrelated to coding of the images of the video sequence into the bitstreamaccording to application constraints. For example, the general codercontrol component 211 manages optimization of bitrate/bitstream sizeversus reconstruction quality. Such decisions may be made based onstorage space/bandwidth availability and image resolution requests. Thegeneral coder control component 211 also manages buffer utilization inlight of transmission speed to mitigate buffer underrun and overrunissues. To manage these issues, the general coder control component 211manages partitioning, prediction, and filtering by the other components.For example, the general coder control component 211 may dynamicallyincrease compression complexity to increase resolution and increasebandwidth usage or decrease compression complexity to decreaseresolution and bandwidth usage. Hence, the general coder controlcomponent 211 controls the other components of codec system 200 tobalance video signal reconstruction quality with bit rate concerns. Thegeneral coder control component 211 creates control data, which controlsthe operation of the other components. The control data is alsoforwarded to the header formatting and CABAC component 231 to be encodedin the bitstream to signal parameters for decoding at the decoder.

The partitioned video signal 201 is also sent to the motion estimationcomponent 221 and the motion compensation component 219 forinter-prediction. A frame or slice of the partitioned video signal 201may be divided into multiple video blocks. Motion estimation component221 and the motion compensation component 219 perform inter-predictivecoding of the received video block relative to one or more blocks in oneor more reference frames to provide temporal prediction. Codec system200 may perform multiple coding passes, e.g., to select an appropriatecoding mode for each block of video data.

Motion estimation component 221 and motion compensation component 219may be highly integrated, but are illustrated separately for conceptualpurposes. Motion estimation, performed by motion estimation component221, is the process of generating motion vectors, which estimate motionfor video blocks. A motion vector, for example, may indicate thedisplacement of a coded object relative to a predictive block. Apredictive block is a block that is found to closely match the block tobe coded, in terms of pixel difference. A predictive block may also bereferred to as a reference block. Such pixel difference may bedetermined by sum of absolute difference (SAD), sum of square difference(SSD), or other difference metrics. HEVC employs several coded objectsincluding a CTU, coding tree blocks (CTBs), and CUs. For example, a CTUcan be divided into CTBs, which can then be divided into CBs forinclusion in CUs. A CU can be encoded as a prediction unit (PU)containing prediction data and/or a transform unit (TU) containingtransformed residual data for the CU. The motion estimation component221 generates motion vectors, PUs, and TUs by using a rate-distortionanalysis as part of a rate distortion optimization process. For example,the motion estimation component 221 may determine multiple referenceblocks, multiple motion vectors, etc. for a current block/frame, and mayselect the reference blocks, motion vectors, etc. having the bestrate-distortion characteristics. The best rate-distortioncharacteristics balance both quality of video reconstruction (e.g.,amount of data loss by compression) with coding efficiency (e.g., sizeof the final encoding).

In some examples, codec system 200 may calculate values for sub-integerpixel positions of reference pictures stored in decoded picture buffercomponent 223. For example, video codec system 200 may interpolatevalues of one-quarter pixel positions, one-eighth pixel positions, orother fractional pixel positions of the reference picture. Therefore,motion estimation component 221 may perform a motion search relative tothe full pixel positions and fractional pixel positions and output amotion vector with fractional pixel precision. The motion estimationcomponent 221 calculates a motion vector for a PU of a video block in aninter-coded slice by comparing the position of the PU to the position ofa predictive block of a reference picture. Motion estimation component221 outputs the calculated motion vector as motion data to headerformatting and CABAC component 231 for encoding and motion to the motioncompensation component 219.

Motion compensation, performed by motion compensation component 219, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation component 221. Again, motionestimation component 221 and motion compensation component 219 may befunctionally integrated, in some examples. Upon receiving the motionvector for the PU of the current video block, motion compensationcomponent 219 may locate the predictive block to which the motion vectorpoints. A residual video block is then formed by subtracting pixelvalues of the predictive block from the pixel values of the currentvideo block being coded, forming pixel difference values. In general,motion estimation component 221 performs motion estimation relative toluma components, and motion compensation component 219 uses motionvectors calculated based on the luma components for both chromacomponents and luma components. The predictive block and residual blockare forwarded to transform scaling and quantization component 213.

The partitioned video signal 201 is also sent to intra-pictureestimation component 215 and intra-picture prediction component 217. Aswith motion estimation component 221 and motion compensation component219, intra-picture estimation component 215 and intra-picture predictioncomponent 217 may be highly integrated, but are illustrated separatelyfor conceptual purposes. The intra-picture estimation component 215 andintra-picture prediction component 217 intra-predict a current blockrelative to blocks in a current frame, as an alternative to theinter-prediction performed by motion estimation component 221 and motioncompensation component 219 between frames, as described above. Inparticular, the intra-picture estimation component 215 determines anintra-prediction mode to use to encode a current block. In someexamples, intra-picture estimation component 215 selects an appropriateintra-prediction mode to encode a current block from multiple testedintra-prediction modes. The selected intra-prediction modes are thenforwarded to the header formatting and CABAC component 231 for encoding.

For example, the intra-picture estimation component 215 calculatesrate-distortion values using a rate-distortion analysis for the varioustested intra-prediction modes, and selects the intra-prediction modehaving the best rate-distortion characteristics among the tested modes.Rate-distortion analysis generally determines an amount of distortion(or error) between an encoded block and an original unencoded block thatwas encoded to produce the encoded block, as well as a bitrate (e.g., anumber of bits) used to produce the encoded block. The intra-pictureestimation component 215 calculates ratios from the distortions andrates for the various encoded blocks to determine which intra-predictionmode exhibits the best rate-distortion value for the block. In addition,intra-picture estimation component 215 may be configured to code depthblocks of a depth map using a depth modeling mode (DMM) based onrate-distortion optimization (RDO).

The intra-picture prediction component 217 may generate a residual blockfrom the predictive block based on the selected intra-prediction modesdetermined by intra-picture estimation component 215 when implemented onan encoder or read the residual block from the bitstream whenimplemented on a decoder. The residual block includes the difference invalues between the predictive block and the original block, representedas a matrix. The residual block is then forwarded to the transformscaling and quantization component 213. The intra-picture estimationcomponent 215 and the intra-picture prediction component 217 may operateon both luma and chroma components.

The transform scaling and quantization component 213 is configured tofurther compress the residual block. The transform scaling andquantization component 213 applies a transform, such as a discretecosine transform (DCT), a discrete sine transform (DST), or aconceptually similar transform, to the residual block, producing a videoblock comprising residual transform coefficient values. Wavelettransforms, integer transforms, sub-band transforms or other types oftransforms could also be used. The transform may convert the residualinformation from a pixel value domain to a transform domain, such as afrequency domain. The transform scaling and quantization component 213is also configured to scale the transformed residual information, forexample based on frequency. Such scaling involves applying a scalefactor to the residual information so that different frequencyinformation is quantized at different granularities, which may affectfinal visual quality of the reconstructed video. The transform scalingand quantization component 213 is also configured to quantize thetransform coefficients to further reduce bit rate. The quantizationprocess may reduce the bit depth associated with some or all of thecoefficients. The degree of quantization may be modified by adjusting aquantization parameter. In some examples, the transform scaling andquantization component 213 may then perform a scan of the matrixincluding the quantized transform coefficients. The quantized transformcoefficients are forwarded to the header formatting and CABAC component231 to be encoded in the bitstream.

The scaling and inverse transform component 229 applies a reverseoperation of the transform scaling and quantization component 213 tosupport motion estimation. The scaling and inverse transform component229 applies inverse scaling, transformation, and/or quantization toreconstruct the residual block in the pixel domain, e.g., for later useas a reference block which may become a predictive block for anothercurrent block. The motion estimation component 221 and/or motioncompensation component 219 may calculate a reference block by adding theresidual block back to a corresponding predictive block for use inmotion estimation of a later block/frame. Filters are applied to thereconstructed reference blocks to mitigate artifacts created duringscaling, quantization, and transform. Such artifacts could otherwisecause inaccurate prediction (and create additional artifacts) whensubsequent blocks are predicted.

The filter control analysis component 227 and the in-loop filterscomponent 225 apply the filters to the residual blocks and/or toreconstructed image blocks. For example, the transformed residual blockfrom the scaling and inverse transform component 229 may be combinedwith a corresponding prediction block from intra-picture predictioncomponent 217 and/or motion compensation component 219 to reconstructthe original image block. The filters may then be applied to thereconstructed image block. In some examples, the filters may instead beapplied to the residual blocks. As with other components in FIG. 2, thefilter control analysis component 227 and the in-loop filters component225 are highly integrated and may be implemented together, but aredepicted separately for conceptual purposes. Filters applied to thereconstructed reference blocks are applied to particular spatial regionsand include multiple parameters to adjust how such filters are applied.The filter control analysis component 227 analyzes the reconstructedreference blocks to determine where such filters should be applied andsets corresponding parameters. Such data is forwarded to the headerformatting and CABAC component 231 as filter control data for encoding.The in-loop filters component 225 applies such filters based on thefilter control data. The filters may include a deblocking filter, anoise suppression filter, a SAO filter, and an adaptive loop filter.Such filters may be applied in the spatial/pixel domain (e.g., on areconstructed pixel block) or in the frequency domain, depending on theexample.

When operating as an encoder, the filtered reconstructed image block,residual block, and/or prediction block are stored in the decodedpicture buffer component 223 for later use in motion estimation asdiscussed above. When operating as a decoder, the decoded picture buffercomponent 223 stores and forwards the reconstructed and filtered blockstoward a display as part of an output video signal. The decoded picturebuffer component 223 may be any memory device capable of storingprediction blocks, residual blocks, and/or reconstructed image blocks.

The header formatting and CABAC component 231 receives the data from thevarious components of codec system 200 and encodes such data into acoded bitstream for transmission toward a decoder. Specifically, theheader formatting and CABAC component 231 generates various headers toencode control data, such as general control data and filter controldata. Further, prediction data, including intra-prediction and motiondata, as well as residual data in the form of quantized transformcoefficient data are all encoded in the bitstream. The final bitstreamincludes all information desired by the decoder to reconstruct theoriginal partitioned video signal 201. Such information may also includeintra-prediction mode index tables (also referred to as codeword mappingtables), definitions of encoding contexts for various blocks,indications of most probable intra-prediction modes, an indication ofpartition information, etc. Such data may be encoded by employingentropy coding. For example, the information may be encoded by employingcontext adaptive variable length coding (CAVLC), CABAC, syntax-basedcontext-adaptive binary arithmetic coding (SBAC), probability intervalpartitioning entropy (PIPE) coding, or another entropy coding technique.Following the entropy coding, the coded bitstream may be transmitted toanother device (e.g., a video decoder) or archived for latertransmission or retrieval.

FIG. 3 is a block diagram illustrating an example video encoder 300.Video encoder 300 may be employed to implement the encoding functions ofcodec system 200 and/or implement steps 101, 103, 105, 107, and/or 109of operating method 100. Encoder 300 partitions an input video signal,resulting in a partitioned video signal 301, which is substantiallysimilar to the partitioned video signal 201. The partitioned videosignal 301 is then compressed and encoded into a bitstream by componentsof encoder 300.

Specifically, the partitioned video signal 301 is forwarded to anintra-picture prediction component 317 for intra-prediction. Theintra-picture prediction component 317 may be substantially similar tointra-picture estimation component 215 and intra-picture predictioncomponent 217. The partitioned video signal 301 is also forwarded to amotion compensation component 321 for inter-prediction based onreference blocks in a decoded picture buffer component 323. The motioncompensation component 321 may be substantially similar to motionestimation component 221 and motion compensation component 219. Theprediction blocks and residual blocks from the intra-picture predictioncomponent 317 and the motion compensation component 321 are forwarded toa transform and quantization component 313 for transform andquantization of the residual blocks. The transform and quantizationcomponent 313 may be substantially similar to the transform scaling andquantization component 213. The transformed and quantized residualblocks and the corresponding prediction blocks (along with associatedcontrol data) are forwarded to an entropy coding component 331 forcoding into a bitstream. The entropy coding component 331 may besubstantially similar to the header formatting and CABAC component 231.

The transformed and quantized residual blocks and/or the correspondingprediction blocks are also forwarded from the transform and quantizationcomponent 313 to an inverse transform and quantization component 329 forreconstruction into reference blocks for use by the motion compensationcomponent 321. The inverse transform and quantization component 329 maybe substantially similar to the scaling and inverse transform component229. In-loop filters in an in-loop filters component 325 are alsoapplied to the residual blocks and/or reconstructed reference blocks,depending on the example. The in-loop filters component 325 may besubstantially similar to the filter control analysis component 227 andthe in-loop filters component 225. The in-loop filters component 325 mayinclude multiple filters as discussed with respect to in-loop filterscomponent 225. The filtered blocks are then stored in a decoded picturebuffer component 323 for use as reference blocks by the motioncompensation component 321. The decoded picture buffer component 323 maybe substantially similar to the decoded picture buffer component 223.

FIG. 4 is a block diagram illustrating an example video decoder 400.Video decoder 400 may be employed to implement the decoding functions ofcodec system 200 and/or implement steps 111, 113, 115, and/or 117 ofoperating method 100. Decoder 400 receives a bitstream, for example froman encoder 300, and generates a reconstructed output video signal basedon the bitstream for display to an end user.

The bitstream is received by an entropy decoding component 433. Theentropy decoding component 433 is configured to implement an entropydecoding scheme, such as CAVLC, CABAC, SBAC, PIPE coding, or otherentropy coding techniques. For example, the entropy decoding component433 may employ header information to provide a context to interpretadditional data encoded as codewords in the bitstream. The decodedinformation includes any desired information to decode the video signal,such as general control data, filter control data, partitioninformation, motion data, prediction data, and quantized transformcoefficients from residual blocks. The quantized transform coefficientsare forwarded to an inverse transform and quantization component 429 forreconstruction into residual blocks. The inverse transform andquantization component 429 may be similar to inverse transform andquantization component 329.

The reconstructed residual blocks and/or prediction blocks are forwardedto intra-picture prediction component 417 for reconstruction into imageblocks based on intra-prediction operations. The intra-pictureprediction component 417 may be similar to intra-picture estimationcomponent 215 and an intra-picture prediction component 217.Specifically, the intra-picture prediction component 417 employsprediction modes to locate a reference block in the frame and applies aresidual block to the result to reconstruct intra-predicted imageblocks. The reconstructed intra-predicted image blocks and/or theresidual blocks and corresponding inter-prediction data are forwarded toa decoded picture buffer component 423 via an in-loop filters component425, which may be substantially similar to decoded picture buffercomponent 223 and in-loop filters component 225, respectively. Thein-loop filters component 425 filters the reconstructed image blocks,residual blocks and/or prediction blocks, and such information is storedin the decoded picture buffer component 423. Reconstructed image blocksfrom decoded picture buffer component 423 are forwarded to a motioncompensation component 421 for inter-prediction. The motion compensationcomponent 421 may be substantially similar to motion estimationcomponent 221 and/or motion compensation component 219. Specifically,the motion compensation component 421 employs motion vectors from areference block to generate a prediction block and applies a residualblock to the result to reconstruct an image block. The resultingreconstructed blocks may also be forwarded via the in-loop filterscomponent 425 to the decoded picture buffer component 423. The decodedpicture buffer component 423 continues to store additional reconstructedimage blocks, which can be reconstructed into frames via the partitioninformation. Such frames may also be placed in a sequence. The sequenceis output toward a display as a reconstructed output video signal.

FIG. 5A is a schematic diagram illustrating an example picture 500partitioned into sub-pictures 510. For example, the picture 500 can bepartitioned for encoding by a codec system 200 and/or an encoder 300 andpartitioned for decoding by a codec system 200 and/or a decoder 400. Asanother example, the picture 500 may be partitioned by an encoder atstep 103 of method 100 for use by a decoder at step 111.

A picture 500 is an image depicting the complete visual portion of avideo sequence at a specified temporal location. The picture 500 mayalso be referred to as an image and/or a frame. A picture 500 may bespecified by a picture order count (POC). The POC is an index thatindicates the output/display order of the pictures 500 in a videosequence. The picture 500 can be partitioned into sub-pictures 510. Asub-picture 510 is a rectangular or square region of one or moreslices/tile groups within a picture 500. Sub-pictures 510 are optional,and hence some video sequences contain sub-pictures 510 while others donot. While four sub-pictures 510 are depicted, the picture 500 can bepartitioned into any number of sub-pictures 510. The partitioning of thesub-picture 510 may be consistent over an entire coded video sequence(CVS).

Sub-pictures 510 may be employed to allow different regions of a picture500 to be treated differently. For example, a specified sub-picture 510may be independently extracted and transmitted to a decoder. As aspecific example, a user employing a virtual reality (VR) headset maysee a sub-set of the picture 500, which may provide the user with theimpression of being physically present in a space as depicted in thepicture 500. In such a case, streaming only the sub-pictures 510 thatare likely to be displayed to the user may increase coding efficiency.As another example, different sub-pictures 510 may be treateddifferently in certain applications. As a specific example, ateleconferencing application may display an active speaker at higherresolution in a more prominent position than users that are notcurrently speaking. Positioning different users in differentsub-pictures 510 supports real time reconfiguring of the displayed imageto support this functionality.

Each sub-picture 510 can be identified by a unique sub-picture ID, whichmay be consistent of the entire CVS. For example, the sub-picture 510 atthe top left of the picture 500 may have a sub-picture ID of zero. Insuch a case, the top left sub-picture 510 of any picture 500 in thesequence can be referred to by the sub-picture ID of zero. Further, eachsub-picture 510 may include a defined configuration, which may beconsistent for the entire CVS. For example, a sub-picture 510 maycontain a height, a width, and/or an offset. The height and widthdescribe the size of the sub-picture 510 and the offset describes thelocation of the sub-picture 510. For example, the sum of the widths ofall of the sub-pictures 510 in a row is the width of the picture 500.Further, the sum of the heights of all of the sub-pictures 510 in acolumn is the height of the picture 500. In addition, the offsetindicates the position of the top left corner of the sub-picture 510relative to the top left corner of the picture 500. The height, width,and offset of a sub-picture 510 provide sufficient information toposition the corresponding sub-picture 510 in the picture 500. Since thepartitioning of sub-pictures 510 may be consistent over an entire CVS,the parameters related to sub-pictures may be contained in a sequenceparameter set (SPS).

FIG. 5B is a schematic diagram illustrating an example sub-picture 510partitioned into slices 515. As shown, sub-picture 510 of a picture 500may contain one or more slices 515. A slice 515 is an integer number ofcomplete tiles or an integer number of consecutive complete CTU rowswithin a tile of a picture that are exclusively contained in a singlenetwork abstraction layer (NAL) unit. While four slices 515 aredepicted, the sub-picture 510 may include any number of slices 515. Theslices 515 contain visual data that is specific to a picture 500 of aspecified POC. Accordingly, parameters related to slices 515 may becontained in a picture parameter set (PPS) and/or a slice header.

FIG. 5C is a schematic diagram illustrating an example slice 515partitioned into tiles 517. As shown, slice 515 of a picture 500 maycontain one or more tiles 517. Tiles 517 may be created by partitioningthe picture 500 into rows and columns of rectangles or squares.Accordingly, a tile 517 is a rectangular or square region of CTUs withina particular tile column and a particular tile row in a picture. Tilingis optional, and hence some video sequences contain tiles 517 whileothers do not. While four tiles 517 are depicted, the slice 515 mayinclude any number of tiles 517. The tiles 517 may contain visual datathat is specific to a slice 515 of a picture 500 of a specified POC. Insome cases, slices 515 may also be contained in tiles 517. Accordingly,parameters related to tiles 517 may be contained in a PPS and/or a sliceheader.

FIG. 5D is a schematic diagram illustrating an example slice 515partitioned into CTUs 519. As shown, slice 515 (or a tile 517 of a slice515) of a picture 500 may contain one or more CTUs 519. A CTU 519 is aregion of the picture 500 that is sub-divided by a coding tree to createcoding blocks, which are encoded/decoded. A CTU 519 may contain lumasamples for a monochrome picture 500 or a combination of luma and chromasamples for a color picture 500. A grouping of luma samples or chromasamples that can be partitioned by a coding tree is referred to as acoding tree block (CTB) 518. As such, a CTU 519 contains a CTB 518 ofluma samples and two corresponding CTBs 518 of chroma samples of apicture 500 that has three sample arrays, or contains a CTB 518 ofsamples of a monochrome picture or a picture that is coded using threeseparate color planes and syntax structures used to code the samples.

As shown above, a picture 500 may be partitioned into sub-pictures 510,slices 515, tiles 517, CTUs 519, and/or CTBs 518, which are thenpartitioned into blocks. Such blocks are then encoded for transmissiontoward a decoder. Decoding such blocks may result in a decoded imagethat contains various types of noise. To correct such issues, videocoding systems may apply various filters across block boundaries. Thesefilters can remove blocking, quantization noise, and other undesirablecoding artifacts. As noted above, the sub-pictures 510 may be employedwhen performing independent extraction. In this case, a currentsub-picture 510 may be decoded and displayed without decodinginformation from other sub-pictures 510. As such, block boundaries alongthe sub-picture 510 edge may align with sub-picture boundaries. In somecases, the block boundaries may also align with tile boundaries. Filtersmay be applied across such block boundaries, and hence applied acrosssub-picture boundaries and/or tile boundaries. This may cause errorswhen a current sub-picture 510 is independently extracted as thefiltering process may operate in an unexpected manner when data from anadjacent sub-picture 510 is unavailable.

In order to address these issues a flag may be employed that controlsfiltering at the sub-picture 510 level. For example, the flag may bedenoted as a loop_filter_across_subpic_enabled_flag. When the flag isset for a sub-picture 510, filters can be applied across thecorresponding sub-picture boundary. When the flag is not set, filtersare not applied across the corresponding sub-picture boundary. In thisway, the filters can be turned off for sub-pictures 510 that are encodedfor separate extraction or turned on for sub-pictures 510 that areencoded for display as a group. Another flag can be set to controlfiltering at the tile 517 level. The flag may be denoted as aloop_filter_across_tiles_enabled_flag. When the flag is set for a tile517, filters can be applied across the tile boundary. When the flag isnot set, filters are not applied across the tile boundary. In this way,the filters can be turned off or on for use at tile boundaries (e.g.,while continuing to filter the internal portions of the tile). As usedherein, a filter is applied across a sub-picture 510 or a tile 517boundary when the filter is applied to samples on both sides of theboundary.

Also as noted above, tiling is optional. However, some video codingsystems describe the sub-picture boundaries in terms of the tiles 517included in the sub-picture 510. In such systems, sub-picture boundarydescriptions in terms of tiles 517 limit the usage of sub-pictures 510to pictures 500 that employ tiles 517. In order to broaden theapplicability of sub-pictures 510, the sub-pictures 510 may be describedin terms of boundaries, in terms of CTBs 518, and/or CTUs 519.Specifically, the width and height of a sub-picture 510 can be signaledin units of CTBs 518. Further, the position of the top left CTU 519 ofthe sub-picture 510 can be signaled as an offset from the top left CTU519 of the picture 500 as measured in CTBs 518. CTU 519 and CTB 518sizes may be set to a predetermined value. Accordingly, signaling thesub-picture dimensions and position in terms of CTBs 518 and CTUs 519provides sufficient information for a decoder to position thesub-picture 510 for display. This allows sub-pictures 510 to be employedeven when tiles 517 are not employed.

In addition, some video coding systems address slices 515 based on theirposition relative to the picture 500. This creates a problem whensub-pictures 510 are coded for independent extraction and display. Insuch a case, slices 515 and corresponding addresses associated with theomitted sub-pictures 510 are also omitted. The omission of the addressesof the slices 515 may prevent the decoder from properly positioning theslices 515. Some video coding systems address this issue by dynamicallyrewriting the addresses in the slice headers associated with the slices515. Since the user may request any sub-picture, such rewriting occurseach time a user requests the video, which is extremely resourceintensive. In order to overcome this issue, the slices 515 are addressedrelative to the sub-picture 510 that contains the slice 515 whensub-pictures 510 are employed. For example, the slice 515 can beidentified by an index or other value that is specific to thesub-picture 510 that contains the slice 515. The slice address can becoded into the slice header associated with the slice 515. Thesub-picture ID of the sub-picture 510 that contains the slice 515 canalso be encoded in a slice header. Further, the dimensions/configurationof the sub-picture 510 can be coded into the SPS along with thesub-picture ID. As such, the decoder can obtain the sub-picture 510configuration from the SPS based on the sub-picture ID and position theslice 515 into the sub-picture 510 without referencing the completepicture 500. As such, slice header rewriting can be omitted when asub-picture 510 is extracted, which significantly reduces resource usageat the encoder, the decoder, and/or a corresponding slicer.

Once a picture 500 is partitioned into CTBs 518 and/or CTUs 519, theCTBs 518 and/or CTUs 519 can be further split into coding blocks. Thecoding blocks can then be coded according to intra-prediction and/orinter-prediction. The present disclosure also includes improvementsrelated to the inter-prediction mechanisms. Inter-prediction can beperformed in several different modes that can operate according tounidirectional inter-prediction and/or bidirectional inter-prediction.

FIG. 6 is a schematic diagram illustrating an example of unidirectionalinter-prediction 600, for example as performed to determine motionvectors (MVs) at block compression step 105, block decoding step 113,motion estimation component 221, motion compensation component 219,motion compensation component 321, and/or motion compensation component421. For example, unidirectional inter-prediction 600 can be employed todetermine motion vectors for encoded and/or decoding blocks created whenpartitioning a picture, such as picture 500.

Unidirectional inter-prediction 600 employs a reference frame 630 with areference block 631 to predict a current block 611 in a current frame610. The reference frame 630 may be temporally positioned after thecurrent frame 610 as shown (e.g., as a subsequent reference frame), butmay also be temporally positioned before the current frame 610 (e.g., asa preceding reference frame) in some examples. The current frame 610 isan example frame/picture being encoded/decoded at a particular time. Thecurrent frame 610 contains an object in the current block 611 thatmatches an object in the reference block 631 of the reference frame 630.The reference frame 630 is a frame that is employed as a reference forencoding a current frame 610, and a reference block 631 is a block inthe reference frame 630 that contains an object also contained in thecurrent block 611 of the current frame 610.

The current block 611 is any coding unit that is being encoded/decodedat a specified point in the coding process. The current block 611 may bean entire partitioned block, or may be a sub-block when employing affineinter-prediction mode. The current frame 610 is separated from thereference frame 630 by some temporal distance (TD) 633. The TD 633indicates an amount of time between the current frame 610 and thereference frame 630 in a video sequence, and may be measured in units offrames. The prediction information for the current block 611 mayreference the reference frame 630 and/or reference block 631 by areference index indicating the direction and temporal distance betweenthe frames. Over the time period represented by the TD 633, the objectin the current block 611 moves from a position in the current frame 610to another position in the reference frame 630 (e.g., the position ofthe reference block 631). For example, the object may move along amotion trajectory 613, which is a direction of movement of an objectover time. A motion vector 635 describes the direction and magnitude ofthe movement of the object along the motion trajectory 613 over the TD633. Accordingly, an encoded motion vector 635, a reference block 631,and a residual including the difference between the current block 611and the reference block 631 provides information sufficient toreconstruct a current block 611 and position the current block 611 inthe current frame 610.

FIG. 7 is a schematic diagram illustrating an example of bidirectionalinter-prediction 700, for example as performed to determine MVs at blockcompression step 105, block decoding step 113, motion estimationcomponent 221, motion compensation component 219, motion compensationcomponent 321, and/or motion compensation component 421. For example,bidirectional inter-prediction 700 can be employed to determine motionvectors for encoded and/or decoding blocks created when partitioning apicture, such as picture 500.

Bidirectional inter-prediction 700 is similar to unidirectionalinter-prediction 600, but employs a pair of reference frames to predicta current block 711 in a current frame 710. Hence current frame 710 andcurrent block 711 are substantially similar to current frame 610 andcurrent block 611, respectively. The current frame 710 is temporallypositioned between a preceding reference frame 720, which occurs beforethe current frame 710 in the video sequence, and a subsequent referenceframe 730, which occurs after the current frame 710 in the videosequence. Preceding reference frame 720 and subsequent reference frame730 are otherwise substantially similar to reference frame 630.

The current block 711 is matched to a preceding reference block 721 inthe preceding reference frame 720 and to a subsequent reference block731 in the subsequent reference frame 730. Such a match indicates that,over the course of the video sequence, an object moves from a positionat the preceding reference block 721 to a position at the subsequentreference block 731 along a motion trajectory 713 and via the currentblock 711. The current frame 710 is separated from the precedingreference frame 720 by some preceding temporal distance (TD0) 723 andseparated from the subsequent reference frame 730 by some subsequenttemporal distance (TD1) 733. The TD0 723 indicates an amount of timebetween the preceding reference frame 720 and the current frame 710 inthe video sequence in units of frames. The TD1733 indicates an amount oftime between the current frame 710 and the subsequent reference frame730 in the video sequence in units of frame. Hence, the object movesfrom the preceding reference block 721 to the current block 711 alongthe motion trajectory 713 over a time period indicated by TD0 723. Theobject also moves from the current block 711 to the subsequent referenceblock 731 along the motion trajectory 713 over a time period indicatedby TD1733. The prediction information for the current block 711 mayreference the preceding reference frame 720 and/or preceding referenceblock 721 and the subsequent reference frame 730 and/or subsequentreference block 731 by a pair of reference indices indicating thedirection and temporal distance between the frames.

A preceding motion vector (MV0) 725 describes the direction andmagnitude of the movement of the object along the motion trajectory 713over the TD0 723 (e.g., between the preceding reference frame 720 andthe current frame 710). A subsequent motion vector (MV1) 735 describesthe direction and magnitude of the movement of the object along themotion trajectory 713 over the TD1733 (e.g., between the current frame710 and the subsequent reference frame 730). As such, in bidirectionalinter-prediction 700, the current block 711 can be coded andreconstructed by employing the preceding reference block 721 and/or thesubsequent reference block 731, MV0 725, and MV1735.

In both merge mode and advanced motion vector prediction (AMVP) mode, acandidate list is generated by adding candidate motion vectors to acandidate list in an order defined by a candidate list determinationpattern. Such candidate motion vectors may include motion vectorsaccording to unidirectional inter-prediction 600, bidirectionalinter-prediction 700, or combinations thereof. Specifically, motionvectors are generated for neighboring blocks when such blocks areencoded. Such motion vectors are added to a candidate list for thecurrent block, and the motion vector for the current block is selectedfrom the candidate list. The motion vector can then be signaled as theindex of the selected motion vector in the candidate list. The decodercan construct the candidate list using the same process as the encoder,and can determine the selected motion vector from the candidate listbased on the signaled index. Hence, the candidate motion vectors includemotion vectors generated according to unidirectional inter-prediction600 and/or bidirectional inter-prediction 700, depending on whichapproach is used when such neighboring blocks are encoded.

FIG. 8 is a schematic diagram illustrating an example 800 of coding acurrent block 801 based on candidate motion vectors from adjacent codedblocks 802. An encoder 300 and/or a decoder 400 operating method 100and/or employing the functionality of codec system 200 can employ theadjacent blocks 802 to generate a candidate list. Such a candidate listcan be employed in inter-prediction according to unidirectionalinter-prediction 600 and/or bidirectional inter-prediction 700. Thecandidate list can then be employed to encode/decode the current block801, which may be generated by partitioning a picture, such as picture500.

The current block 801 is a block being encoded at an encoder or decodedat a decoder, depending on the example, at a specified time. The codedblocks 802 are blocks that are already encoded at the specified time.Hence, the coded blocks 802 are potentially available for use whengenerating a candidate list. The current block 801 and the coded blocks802 may be included in a common frame and/or may be included in atemporally adjacent frame. When the coded blocks 802 are included in acommon frame with the current block 801, the coded blocks 802 contain aboundary that is immediately adjacent to (e.g., abuts) a boundary of thecurrent block 801. When a coded block 802 is included in a temporallyadjacent frame, the coded block 802 is located at the same position inthe temporally adjacent frame as the position of the current block 801in the current frame. The candidate list can be generated by adding themotion vectors from the coded blocks 802 as candidate motion vectors.The current block 801 can then be coded by selecting a candidate motionvector from the candidate list and signaling the index of the selectedcandidate motion vector.

FIG. 9 is a schematic diagram illustrating an example pattern 900 fordetermining a candidate list of motion vectors. Specifically, an encoder300 and/or a decoder 400 operating method 100 and/or employing thefunctionality of codec system 200 can employ the candidate listdetermination pattern 900 for use in generating a candidate list 911 forencoding a current block 801 partitioned from a picture 500. Theresulting candidate list 911 may be a merge candidate list or an AMVPcandidate list, which can be employed in inter-prediction according tounidirectional inter-prediction 600 and/or bidirectionalinter-prediction 700.

When encoding a current block 901, the candidate list determinationpattern 900 searches positions 905, denoted as A0, A1, B0, B1, and/orB2, in the same picture/frame as the current block 901 for validcandidate motion vectors. The candidate list determination pattern 900may also search collocated block 909 for valid candidate motion vectors.The collocated block 909 is a block in the same position as the currentblock 901, but is included in a temporally adjacent picture/frame. Thecandidate motion vectors can then be positioned in a candidate list 911in a predetermined checking order. Accordingly, the candidate list 911is a procedurally generated list of indexed candidate motion vectors.

The candidate list 911 can be employed to select a motion vector toperform inter-prediction for the current block 901. For example, theencoder can obtain the samples of the reference blocks pointed to by thecandidate motion vectors from the candidate list 911. The encoder canthen select the candidate motion vector that points to the referenceblock that most closely matches the current block 901. The index of theselected candidate motion vector can then be encoded to represent thecurrent block 901. In some cases, the candidate motion vector(s) pointto a reference block that contains partial reference samples 915. Inthis case, an interpolation filter 913 can be employed to reconstructthe complete reference samples 915 to support motion vector selection.An interpolation filter 913 is a filter capable of upsampling a signal.Specifically, the interpolation filter 913 is a filter capable ofaccepting a partial/lower quality signal as an input and determining anapproximation of a more complete/higher quality signal. As such, theinterpolation filter 913 can be employed in certain cases to obtain acomplete set of reference samples 915 for use in selecting the referenceblock for the current block 901, and hence in selecting the motionvector to encode the current block 901.

The preceding mechanisms for coding a block based on inter-prediction byusing a candidate list may cause certain errors when sub-pictures, suchas sub-pictures 510, are employed. Specifically, the problems may occurwhen a current block 901 is contained in a current sub-picture, but amotion vector points to a reference block positioned at least partiallyin an adjacent sub-picture. In such a case, the current sub-picture maybe extracted for presentation without the adjacent sub-picture. Whenthis occurs, the portions of the reference block in the adjacentsub-picture may not be transmitted to the decoder, and hence thereference block may not be available for decoding the current block 901.When this occurs, the decoder does not have access to sufficient data todecode the current block 901.

The present disclosure provides mechanisms to address this problem. Inan example, a flag is employed that indicates the current sub-pictureshould be treated as a picture. This flag can be set to support separateextraction of the sub-picture. Specifically, when the flag is set, thecurrent sub-picture should be encoded without referencing data in othersub-pictures. In this case, the current sub-picture is treated like apicture in that the current sub-picture is coded separately from othersub-pictures and can be displayed as a separate picture. Hence, thisflag may be denoted as a subpic_treated_aspic_flag[i] where i is anindex of the current sub-picture. When the flag is set, the motionvector candidates (also known as motion vector predictors) obtained froma collocated block 909 include only motion vectors that point inside thecurrent sub-picture. Any motion vector predictors that point outside ofthe current sub-picture are excluded from the candidate list 911. Thisensures that motion vectors that point outside of the currentsub-picture are not selected and associated errors are avoided. Thisexample specifically applies to motion vectors from the collocated block909. Motion vectors from search positions 905 in the same picture/framemay be corrected by separate mechanisms as described below.

Another example may be employed to address the search positions 905 whenthe current sub-picture is treated as a picture (e.g., when thesubpic_treated_as_pic_flag[i] is set). When the current sub-picture istreated like a picture, the current sub-picture should be extractedwithout reference to other sub-pictures. The example mechanism relatesto interpolation filters 913. An interpolation filter 913 can be appliedto samples in one location to interpolate (e.g., predict) relatedsamples in another location. In the present example, motion vectors fromcoded blocks at the search positions 905 may point to reference samples915 outside the current sub-picture so long as interpolation filters 913can interpolate such reference samples 915 based only on referencesamples 915 from the current sub-picture. Accordingly, the presentexample employs a clipping function that is applied when applyinginterpolation filters 913 to motion vector candidates from the searchpositions 905 from the same picture. This clipping function clips datafrom the adjacent sub-pictures and hence removes such data as input tothe interpolation filter 913 when determining reference samples 915pointed to by motion vector candidates. This approach maintainsseparation between the sub-pictures during encoding to support separateextraction and decoding when the sub-picture is treated as a picture.The clipping function may be applied to a luma sample bilinearinterpolation process, a luma sample eight tap interpolation filteringprocess, and/or a chroma sample interpolation process.

FIG. 10 is a block diagram illustrating an example in-loop filter 1000.The in-loop filter 1000 may be employed to implement in-loop filters225, 325, and/or 425. Further, the in-loop filter 1000 may be applied atthe encoder and the decoder when performing method 100. In addition, thein-loop filter 1000 can be applied to filter a current block 801partitioned from a picture 500, which may be coded according tounidirectional inter-prediction 600 and/or bidirectionalinter-prediction 700 based on a candidate list generated according topattern 900. The in-loop filter 1000 includes a deblocking filter 1043,a SAO filter 1045, and an adaptive loop filter (ALF) 1047. The filtersof in-loop filter 1000 are applied in sequence to reconstructed imageblocks at an encoder (e.g., prior to use as reference blocks) and at thedecoder prior to display.

The deblocking filter 1043 is configured to remove block shaped edgescreated by block based inter and intra prediction. The deblocking filter1043 scans an image portion (e.g., an image slice) for discontinuitiesin chroma and/or luma values occurring at partition boundaries. Thedeblocking filter 1043 then applies a smoothing function to the blockboundaries to remove such discontinuities. The strength of thedeblocking filter 1043 may be varied depending on the spatial activity(e.g., variance of luma/chroma components) occurring in an area adjacentto the block boundaries.

The SAO filter 1045 is configured to remove artifacts related to sampledistortion caused by the encoding process. The SAO filter 1045 at anencoder classifies deblocked samples of a reconstructed image intoseveral categories based on relative deblocking edge shape and/ordirection. An offset is then determined and added to the samples basedon the categories. The offsets are then encoded in the bitstream andemployed by the SAO filter 1045 at the decoder. The SAO filter 1045removes banding artefacts (bands of values instead of smoothtransitions) and ringing artefacts (spurious signals near sharp edges).

The ALF 1047, at the encoder, is configured to compare a reconstructedimage to an original image. The ALF 1047 determines coefficients thatdescribe the differences between the reconstructed image and theoriginal image, for example via a Wiener based adaptive filter. Suchcoefficients are encoded in the bitstream and employed by the ALF 1047at the decoder to remove the differences between the reconstructed imageand the original image.

Image data filtered by the in-loop filter 1000 is output to a picturebuffer 1023, which is substantially similar to decoded picture buffer223, 323, and/or 423. As noted above, the deblocking filter 1043, theSAO filter 1045, and/or the ALF 1047 can be turned off at sub-pictureboundaries and/or tile boundaries by flags, such as aloop_filter_across_subpic_enabled flag and/or aloop_filter_across_tiles_enabled_flag, respectively.

FIG. 11 is a schematic diagram illustrating an example bitstream 1100containing coding tool parameters to support decoding a sub-picture of apicture. For example, the bitstream 1100 can be generated by a codecsystem 200 and/or an encoder 300 for decoding by a codec system 200and/or a decoder 400. As another example, the bitstream 1100 may begenerated by an encoder at step 109 of method 100 for use by a decoderat step 111. Further, the bitstream 1100 may contain an encoded picture500, corresponding sub-pictures 510, and/or associated coded blocks,such as current blocks 801 and/or 901, which may be coded according tounidirectional inter-prediction 600 and/or bidirectionalinter-prediction 700 based on a candidate list generated according topattern 900. The bitstream 1100 may also contain parameters forconfiguring the in-loop filter 1000.

The bitstream 1100 includes a sequence parameter set (SPS) 1110, aplurality of picture parameter sets (PPSs) 1111, a plurality of sliceheaders 1115, and image data 1120. An SPS 1110 contains sequence datacommon to all the pictures in the video sequence contained in thebitstream 1100. Such data can include picture sizing, bit depth, codingtool parameters, bit rate restrictions, etc. The PPS 1111 containsparameters that apply to an entire picture. Hence, each picture in thevideo sequence may refer to a PPS 1111. It should be noted that, whileeach picture refers to a PPS 1111, a single PPS 1111 can contain datafor multiple pictures in some examples. For example, multiple similarpictures may be coded according to similar parameters. In such a case, asingle PPS 1111 may contain data for such similar pictures. The PPS 1111can indicate coding tools available for slices in correspondingpictures, quantization parameters, offsets, etc. The slice header 1115contains parameters that are specific to each slice in a picture. Hence,there may be one slice header 1115 per slice in the video sequence. Theslice header 1115 may contain slice type information, picture ordercounts (POCs), reference picture lists, prediction weights, tile entrypoints, deblocking parameters, etc. It should be noted that a sliceheader 1115 may also be referred to as a tile group header in somecontexts.

The image data 1120 contains video data encoded according tointer-prediction and/or intra-prediction as well as correspondingtransformed and quantized residual data. For example, a video sequenceincludes a plurality of pictures coded as image data. A picture is asingle frame of a video sequence and hence is generally displayed as asingle unit when displaying the video sequence. However, sub-picturesmay be displayed to implement certain technologies such as virtualreality, picture in picture, etc. The pictures each reference a PPS1111. The pictures are divided into sub-pictures, tiles, and/or slicesas discussed above. In some systems, the slices are referred to as tilegroups containing tiles. The slices and/or tile groups of tilesreference a slice header 1115. The slices are further divided into CTUsand/or CTBs. The CTUs/CTBs are further divided into coding blocks basedon coding trees. The coding blocks can then be encoded/decoded accordingto prediction mechanisms.

The parameter sets in the bitstream 1100 contain various data that canbe employed to implement the examples described herein. To support afirst example implementation, the SPS 1110 of the bitstream 1100contains a sub-pic treated as a pic flag 1131 related to a specifiedsub-picture. In some examples, the sub-pic treated as a pic flag 1131 isdenoted as asubpic_treated_as_pic_flag[i] where i is an index of thesub-picture associated with the flag. For example, the sub-pic treatedas a pic flag 1131 may be set equal to one to specify that an i-thsub-picture of each coded picture in a coded video sequence (in theimage data 1120) is treated as a picture in a decoding process exclusiveof in-loop filtering operations. The sub-pic treated as a pic flag 1131may be employed when a current sub-picture in a current picture has beencoded according to inter-prediction. When the sub-pic treated as a picflag 1131 is set to indicate the current sub-picture is treated as apicture, a candidate list of candidate motion vectors for a currentblock can be determined by excluding collocated motion vectors from thecandidate list that are included in a collocated block and that pointoutside of the current sub-picture. This ensures that motion vectorsthat point outside of the current sub-picture are not selected andassociated errors are avoided when the current sub-picture is extractedseparately from other subpictures.

In some examples, the candidate list of motion vectors for the currentblock are determined according to temporal luma motion vectorprediction. For example, temporal luma motion vector prediction may beemployed when the current block is a luma block of luma samples, aselected current motion vector for the current block is a temporal lumamotion vector pointing to reference luma samples in a reference block,and the current block is coded based on the reference luma samples. Insuch a case, the temporal luma motion vector prediction is performedaccording to:

xColBr=xCb+cbWidth;

yColBr=yCb+cbHeight;

-   -   rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?        SubPicRightBoundaryPos: pic_width_in_luma_samples−1; and    -   botBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?        SubPicBotBoundaryPos: pic_height_in_luma samples−1,        where xColBr and yColBR specify a location of the collocated        block, xCb and yCb specify a top left sample of the current        block relative to a top left sample of the current picture,        cbWidth is a width of the current block, cbHeight is a height of        the current block, SubPicRightBoundaryPos is a position of a        right boundary of the sub-picture, SubPicBotBoundaryPos is a        position of a bottom boundary of the sub-picture,        pic_width_in_luma samples is a width of the current picture        measured in luma samples, pic_height_in_luma samples is a height        of the current picture measured in luma samples, botBoundaryPos        is a computed position of the bottom boundary of the        sub-picture, rightBoundaryPos is a computed position of the        right boundary of the sub-picture, SubPicIdx is an index of the        sub-picture, and wherein collocated motion vectors are excluded        when yCb>>CtbLog2SizeY is not equal to yColBr>>CtbLog2SizeY,        where CtbLog2SizeY indicates a size of a coding tree block.

The sub-pic treated as a pic flag 1131 may also be employed for a secondexample implementation. As in the first example, the sub-pic treated asa pic flag 1131 may be employed when a current sub-picture in a currentpicture has been coded according to inter-prediction. In this example, amotion vector can be determined for a current block of the sub-picture(e.g., from a candidate list). When the sub-pic treated as a pic flag1131 is set, a clipping function can be applied to sample locations in areference block. A sample location is a position in a picture that cancontain a single sample including a luma value and/or a pair of chromavalues. An interpolation filter can then be applied when the motionvector points outside of the current sub-picture. This clipping functionensures that the interpolation filter does not rely on data fromadjacent sub-pictures in order to maintain separation between thesub-pictures to support separate extraction.

The clipping function can be applied in a luma sample bilinearinterpolation process. The luma sample bilinear interpolation processmay receive inputs including a luma location in full sample units(xIntL, yIntL). The luma sample bilinear interpolation process outputs apredicted luma sample value (predSampleLXL). The clipping function isapplied to the sample locations as follows. Whensubpic_treated_as_pic_flag[SubPicIdx] is equal to one, the followingapplies:

xInti=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,xIntL+i), and

yInti=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,yIntL+i),

where subpic_treated_aspic_flag is the flag set to indicate thesub-picture is treated as a picture, SubPicIdx is an index of thesub-picture, xInti and yInti are a clipped sample location at index i,SubPicRightBoundaryPos is a position of a right boundary of thesub-picture, SubPicLeftBoundaryPos is a position of a left boundary ofthe sub-picture, SubPicTopBoundaryPos is a position of a top boundary ofthe sub-picture, SubPicBotBoundaryPos is a position of a bottom boundaryof the sub-picture, and Clip3 is the clipping function according to:

${{Clip3}\left( {x,y,z} \right)} = \left\{ \begin{matrix}x & ; & {z < x} \\y & ; & {z > y} \\z & ; & {otherwise}\end{matrix} \right.$

where x, y, and z are numerical input values.

The clipping function can also be applied in a luma sample eight tapinterpolation filtering process. The luma sample eight tap interpolationfiltering process receives inputs including a luma location in fullsample units (xIntL, yIntL). The luma sample bilinear interpolationprocess outputs a predicted luma sample value (predSampleLXL). Theclipping function is applied to the sample locations as follows. Whensubpic_treated_as_pic_flag [SubPicIdx] is equal to one, the followingapplies:

xInti=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,xIntL+i−3), and

yInti=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,yIntL+i−3),

where subpic_treated_aspic_flag is the flag set to indicate thesub-picture is treated as a picture, SubPicIdx is an index of thesub-picture, xInti and yInti are a clipped sample location at index i,SubPicRightBoundaryPos is a position of a right boundary of thesub-picture, SubPicLeftBoundaryPos is a position of a left boundary ofthe sub-picture, SubPicTopBoundaryPos is a position of a top boundary ofthe sub-picture, SubPicBotBoundaryPos is a position of a bottom boundaryof the sub-picture, and Clip3 is as described above.

The clipping function can also be applied in a chroma sampleinterpolation process. The chroma sample interpolation process receivesinputs including a chroma location in full sample units (xIntC, yIntC).The chroma sample interpolation process outputs a predicted chromasample value (predSampleLXC). The clipping function is applied to thesample locations as follows. When subpic_treated_as_pic_flag[SubPicIdx]is equal to one, the following applies:

xInti=Clip3(SubPicLeftBoundaryPos/SubWidthC,SubPicRightBoundaryPos/SubWidthC,xIntC+i),and

yInti=Clip3(SubPicTopBoundaryPos/SubHeightC,SubPicBotBoundaryPos/SubHeightC,yIntC+i),

where subpic_treated_as_pic_flag is the flag set to indicate thesub-picture is treated as a picture, SubPicIdx is an index of thesub-picture, xInti and yInti are a clipped sample location at index i,SubPicRightBoundaryPos is a position of a right boundary of thesub-picture, SubPicLeftBoundaryPos is a position of a left boundary ofthe sub-picture, SubPicTopBoundaryPos is a position of a top boundary ofthe sub-picture, SubPicBotBoundaryPos is a position of a bottom boundaryof the sub-picture, SubWidthC and SubHeightC indicate a horizontal andvertical sampling rate ratio between luma and chroma samples, and Clip3is as described above.

A loop filter across sub-pic enabled flag 1132 in the SPS 1110 may beemployed for a third example implementation. The loop filter acrosssub-pic enabled flag 1132 may be set to control whether filtering isemployed across boundaries of specified sub-pictures. For example, theloop filter across sub-pic enabled flag 1132 may be denoted as aloop_filter_across_subpic_enabled_flag. The loop filter across sub-picenabled flag 1132 may be set to one when specifying that in-loopfiltering operations can be performed across boundaries of thesubpicture or set to zero when specifying that in-loop filteringoperations are not performed across boundaries of the subpicture. Hence,filtering operations may or may not be performed across the sub-pictureboundary based on the value of the loop filter across sub-pic enabledflag 1132. The filtering operations may include applying a deblockingfilter 1043, an ALF 1047, and/or a SAO filter 1045. In this way, thefilters can be turned off for sub-pictures that are encoded for separateextraction or turned on for sub-pictures that are encoded for display asa group.

A loop filter across tiles enabled flag 1134 in the PPS 1111 may beemployed for a fourth example implementation. The loop filter acrosstiles enabled flag 1134 may be set to control whether filtering isemployed across boundaries of specified tiles. For example, the loopfilter across tiles enabled flag 1134 may be denoted as aloop_filter_across_tiles_enabled_flag. The loop filter across tilesenabled flag 1134 may be set to one when specifying that in-loopfiltering operations can be performed across boundaries of the tile orset to zero when specifying that in-loop filtering operations are notperformed across boundaries of the tile. Hence, filtering operations mayor may not be performed across specified tile boundaries based on thevalue of the loop filter across tiles enabled flag 1134. The filteringoperations may include applying a deblocking filter 1043, an ALF 1047,and/or a SAO filter 1045.

Sub-picture data 1133 in the SPS 1110 may be employed for a fifthexample implementation. The sub-picture data 1133 may include a width,height, and offset for each sub-picture in the image data 1120. Forexample, the width and height of each sub-picture can be described inthe sub-picture data 1133 in units of CTBs. In some examples, the widthand height of the sub-picture are stored in the sub-picture data 1133 assubpic_width_minus1 and subpic_height_minus1, respectively. Further, anoffset of each sub-picture can be described in the sub-picture data 1133in units of CTUs. For example, the offset of each sub-picture can bespecified as a vertical position and a horizontal position of the topleft CTU of the sub-picture. Specifically, the offset of the sub-picturecan be specified as a difference between the top left CTU of the pictureand the top left CTU of the sub-picture. In some examples, the verticalposition and the horizontal position of the top left CTU of thesub-picture is stored in the sub-picture data 1133 as a subpic_ctu_topJeft_y and subpic_ctu_top Jeft_x, respectively. This exampleimplementation describes the sub-pictures in the sub-picture data 1133in terms of CTBs/CTUs instead of in terms of tiles. This allowssub-pictures to be employed even when tiles are not employed in thecorresponding picture/sub-picture.

The sub-picture data 1133 in the SPS 1110, a slice address 1136 in theslice header 1115, and a slice sub-picture ID 1135 in the slice header1115 may be employed for a sixth example implementation. The sub-picturedata 1133 may be implemented as described in the fifth exampleimplementation. The slice address 1136 may include a sub-picture levelslice index of a slice (e.g., in image data 1120) associated with theslice header 1115. For example, the slice is indexed based on theslice's position in the sub-picture instead of based on the slice'sposition in the picture. The slice address 1136 may be stored in aslice_address variable. The slice sub-picture ID 1135 includes an ID ofthe sub-picture that contains the slice associated with the slice header1115. Specifically, the slice sub-picture ID 1135 may reference thedescription (e.g., width, height, and offset) of the correspondingsub-picture in the sub-picture data 1133. The slice sub-picture ID 1135may be stored in a slice_subpic_id variable. Accordingly, the sliceaddress 1136 is signaled as an index based on the slice's position inthe sub-picture denoted by the slice sub-picture ID 1135 as described inthe sub-picture data 1133. In this way, the position of the slice in thesub-picture can be determined even when the sub-picture is separatelyextracted and other sub-pictures are omitted from the bitstream 1100.This is because this addressing scheme segregates each sub-picture'saddresses from other sub-pictures. Accordingly, the slice header 1115does not need to be rewritten when the sub-picture is extracted as wouldbe required in an addressing scheme where the slice is addressed basedon the slice's position in the picture. It should be noted that thisapproach may be employed when the slice is a rectangular or square slice(as opposed to a raster scan slice). For example, a rectsliceflag in thePPS 1111 can be set equal to one to indicate the slice is a rectangularslice.

An example implementation of sub-pictures used in some video codingsystems is as follows. Information related to sub-pictures that may bepresent in a CVS may be signaled in a SPS. Such signaling may includethe following information. The number of sub-pictures that are presentin each picture of the CVS may be included in the SPS. In the context ofthe SPS or a CVS, the collocated sub-pictures for all the access units(AUs) may collectively be referred to as a sub-picture sequence. A loopfor further specifying information related to properties of eachsub-picture may also be included in the SPS. Such information mayinclude the sub-picture identification, the location of sub-picture(e.g., the offset distance between the top-left corner luma sample ofthe sub-picture and the top-left corner luma sample of the picture), andthe size of the sub-picture. In addition, the SPS may also be employedto signal whether each of the sub-pictures is a motion-constrainedsub-picture, where a motion-constrained sub-picture is a sub-picturethat contains a MCTS. Profile, tier, and level information for eachsub-picture may be included in a bitstream unless such information isotherwise derivable. Such information may be employed for profile, tier,and level information for an extracted bitstream created from extractingthe sub-picture from the original bitstream including the entirepicture. The profile and tier of each sub-picture may be derived to bethe same as the profile and tier of the original. The level for eachsub-picture may be signaled explicitly. Such signaling may be present inthe loop described above. Sequence-level hypothetical reference decoder(HRD) parameters, may be signaled in a video usability information (VUI)portion of the SPS for each sub-picture (or equivalently, eachsub-picture sequence).

When a picture is not partitioned into two or more sub-pictures, theproperties of the sub-picture (e.g., location, size, etc.), except thesub-picture ID, may be not signaled in the bitstream. When a sub-picturein pictures in a CVS is extracted, each access unit in the new bitstreammay not contain sub-pictures, because the resulting image data in eachAU in the new bitstream is not partitioned into multiple sub-pictures.Therefore, the sub-picture properties such as location and size may beomitted from the SPS since such information can be derived from thepicture properties. However, the sub-picture identification is stillsignaled as this ID may be referred to by video coding layer (VCL) NALunits/tile groups included in the extracted sub-picture. Changing thesub-picture ID should be avoided when extracting the sub-picture toreduce resource usage.

The location of a sub-picture in the picture (x offset and y offset) canbe signaled in units of luma samples and may represent the distancebetween the top-left corner luma sample of the sub-picture and top-leftcorner luma sample ofthe picture. In another example, the location of asub-picture in the picture can be signaled in units of the minimumcoding luma block size (MinCbSizeY) and may represent the distancebetween top-left corner luma sample of the sub-picture and top-leftcorner luma sample of the picture. In another example, the unit ofsub-picture location offsets may be explicitly indicated by a syntaxelement in a parameter set, and the unit may be CtbSizeY, MinCbSizeY,luma sample, or other values. The codec may require that when asub-picture's right border does not coincide with picture's rightborder, the sub-picture's width shall be an integer multiple of luma CTUsize (CtbSizeY). Likewise, the codec may further require that when asub-picture's bottom border does not coincide with picture's bottomborder, the sub-picture's height shall be an integer multiple ofCtbSizeY. The codec may also require that when a sub-picture's width isnot an integer multiple of luma CTU size, the sub-picture is located atright most position in the picture. Likewise, the codec may also requirethe sub-picture to be located at the bottom most position in the picturewhen the sub-picture's height is not an integer multiple of luma CTUsize. When a sub-picture's width is signaled in units of luma CTU sizeand the width of the sub-picture is not an integer multiple of luma CTUsize, the actual width in luma samples may be derived based on thesub-picture's offset location, the sub-picture's width in luma CTU size,and the picture's width in luma samples. Likewise, when a sub-picture'sheight is signaled in units of luma CTU size and the height of thesub-picture is not an integer multiple of luma CTU size, the actualheight in luma samples can be derived based on the sub-picture's offsetlocation, the sub-picture's height in luma CTU size, and the picture'sheight in luma samples.

For any sub-picture, the sub-picture ID may be different from thesub-picture index. The sub-picture index may be the index of thesub-picture as signaled in the loop of sub-pictures in the SPS.Alternatively, the sub-picture index may be an index assigned insub-picture raster scan order relative to the picture. When the value ofthe sub-picture ID of each sub-picture is the same as its sub-pictureindex, the sub-picture ID may be signaled or derived. When thesub-picture ID of each sub-picture is different from its sub-pictureindex, the sub-picture ID is explicitly signaled. The number of bits forsignaling sub-picture IDs may be signaled in the same parameter set thatcontains sub-picture properties (e.g., in the SPS). Some values forsub-picture ID may be reserved for certain purposes. Such valuereservation can be as follows. When tile group/slice headers contain asub-picture ID to specify which sub-picture includes the tile group, thevalue zero may be reserved and may not be used for sub-pictures toensure the first few bits in the beginning of a tile group/slice headerare not all zeros to avoid generating an emulation prevention code. Whensub-pictures of a picture do not cover the whole area of the picturewithout overlap and gap, a value (e.g., value one) may be reserved fortile groups that are not part of any of the sub-pictures. Alternatively,the sub-picture ID of the remaining area may be explicitly signaled. Thenumber of bits for signaling sub-picture ID may be constrained asfollows. The value range should be enough to uniquely identify allsub-pictures in a picture, including the reserved values of sub-pictureID. For example, the minimum number of bits for a sub-picture ID can bethe value of Ceil(Log2(number of sub-pictures in a picture+number ofreserved sub-picture ID).

The union of sub-pictures in a loop may be required to cover the wholepicture without gap and without overlap. When this constraint is applieda flag is present for each sub-picture to specify whether thesub-picture is a motion-constrained sub-picture which means thesub-picture can be extracted. Alternatively, the union of sub-picturesmay not cover the entire picture. However, there may be no overlap amongsub-pictures of a picture.

Sub-picture IDs may be present immediately after a NAL unit header toassist the sub-picture extraction process so the extractor need notunderstand the rest of the NAL unit bits. For VCL NAL units, thesub-picture ID may be present in the first bits of tile group headers.For non-VCL NAL units, the following may apply. The sub-picture ID maynot be required to be present immediately after the NAL unit header forthe SPS. Concerning the PPS, when all tile groups of the same pictureare constrained to refer to the same PPS, there is no need forsub-picture ID to be present immediately after the NAL unit header. Onthe other hand, if tile groups of the same picture are allowed to referto different PPSs, the sub-picture ID may be present in the first bitsof PPS (e.g., immediately after the PPS NAL unit header). In this case,no two different tile groups of one picture are allowed to share thesame PPS. Alternatively, when tile groups of the same picture areallowed to refer to different PPSs, and different tile groups of thesame picture are also allowed to share the same PPS, no sub-picture IDis present in the PPS syntax. Alternatively, when tile groups of thesame picture are allowed to refer to different PPSs and different tilegroups of the same picture are also allowed to share the same PPS, alist of sub-picture IDs is present in the PPS syntax. The list indicatesthe sub-pictures to which the PPS applies. For other non-VCL NAL units,if the non-VCL unit applies to the picture level (e.g., access unitdelimeter, end of sequence, end of bitstream, etc.) or above, then thereis no need for sub-picture ID to be present immediately after its NALunit header. Otherwise, the sub-picture ID may be present immediatelyafter the NAL unit header.

Tile partitioning within individual sub-pictures may be signaled in thePPS, but tile groups within the same picture are allowed to refer todifferent PPSs. In this case, tiles are grouped within each sub-pictureinstead of across the picture. Accordingly, the tile grouping concept insuch a case includes a partitioning of a sub-picture into tiles.Alternatively, a Sub-Picture Parameter Set (SPPS) may be employed fordescribing the tile partitioning within individual sub-pictures. An SPPSrefers to an SPS by employing a syntax element referring to the SPS ID.An SPPS may contain sub-picture ID. For sub-picture extraction purposes,the syntax element referring to the sub-picture ID is the first syntaxelement in SPPS. The SPPS contains a tile structure indicating a numberof columns, a number of rows, uniform tile spacing, etc. The SPPS maycontain a flag to indicate whether or not loop filter is enabled acrossassociated sub-picture boundaries. Alternatively, the sub-pictureproperties for each sub-picture may be signaled in the SPPS instead ofin the SPS. Tile partitioning within individual sub-pictures may besignaled in the PPS, but tile groups within the same picture are allowedto refer to different PPSs. Once activated, an SPPS may last for asequence of consecutive AUs in decoding order, but may bedeactivated/activated at an AU that is not the start of a CVS. MultipleSPPSs may be active at any moment during the decoding process of asingle-layer bitstream with multiple sub-pictures, and an SPPS may beshared by different sub-pictures of an AU. Alternatively, SPPS and PPScan be merged into one parameter set. For this to occur, all tile groupsthat are included into the same sub-picture may be constrained to referto the same parameter set resulting from the merge between SPPS and PPS.

The number of bits used for signaling the sub-picture ID may be signaledin the NAL unit header. Such information, when present, assists thesub-picture extraction process in parsing sub-picture ID values for thebeginning of a NAL unit's payload (e.g., the first few bits immediatelyafter NAL unit header). For such signaling, some of the reserved bits ina NAL unit header may be used to avoid increasing the length of the NALunit header. The number of bits for such signaling should cover thevalue of sub-picture-ID-bit-len. For example, four bits out of sevenreserved bits in the VVCs NAL unit header may be used for this purpose.

When decoding a sub-picture, the location of each coding tree block,denoted as vertical CTB position (xCtb) and horizontal CTB position(yCtb), are adjusted to an actual luma sample location in the pictureinstead of a luma sample location in the sub-picture. In this way,extraction of the co-located sub-picture from each reference picture canbe avoided as everything is decoded as if located in the picture insteadof in the sub-picture. For adjusting the location of the coding treeblock, the variables SubpictureXOffset and SubpictureYOffset are derivedbased on the sub-picture position (subpic_x_offset and subpic_y_offset).The values of the variables are added to the values of the luma samplelocation x and y coordinates, respectively, of each coding tree block inthe sub-picture. The sub-picture extraction process can be defined asfollows. The input to the process includes the target sub-picture to beextracted. This can be input in the form of a sub-picture ID or asub-picture location. When the input is the sub-picture's location, theassociated sub-picture ID can be resolved by parsing the sub-pictureinformation in the SPS. For non-VCL NAL units, the following apply. Thesyntax elements in the SPS related to picture size and level are updatedwith the sub-picture's size and level information. The following non-VCLNAL units are not altered by extraction: PPS, access unit delimiter(AUD), end of sequence (EOS), end of bitstream (EOB), and any othernon-VCL NAL units that are applicable to picture level or above. Theremaining non-VCL NAL units with sub-picture ID not equal to the targetsub-picture ID are removed. VCL NAL units with sub-picture ID not equalto the target sub-picture ID are also removed.

A sub-picture nesting SEI message may be used for nesting of AU-level orsub-picture-level SEI messages for a set of sub-pictures. The datacarried in the sub-picture nesting SEI message may include bufferingperiod, picture timing, and non-HRD SEI messages. The syntax andsemantics of this SEI message can be as follows. For systems operations,such as omnidirectional media format (OMAF) environments, a set ofsub-picture sequences covering a viewport may be requested and decodedby the OMAF player. Therefore, a sequence-level SEI message may carryinformation of a set of sub-picture sequences that collectively includea rectangular or square picture region. The information can be used bysystems, and the information is indicative of the minimum decodingcapability as well as the bitrate of the set of sub-picture sequences.The information includes the level of the bitstream including only theset of sub-picture sequences, the bit rate of the bitstream, andoptionally a sub-bitstream extraction process specified for the set ofsub-picture sequences.

The preceding implementation includes several problems. The signaling ofthe width and height of the picture and/or the widths/heights/offsets ofthe sub-pictures is not efficient. More bits can be saved for signalingsuch information. When the sub-picture size and position information issignaled in the SPS, the PPS includes the tile configuration. Further, aPPS is allowed to be shared by multiple sub-pictures of the samepicture. Hence, the value ranges for numtile_columns_minus1 andnumtile_rows_minus1 should be more clearly specified. Further, thesemantics of the flag indicating whether a sub-picture is motionconstrained is not clearly specified. The level is mandatorily signaledfor each sub-picture sequence. However, when a sub-picture sequencecannot be independently decoded, signaling the level of the sub-pictureis not useful. Furthermore, in some applications some sub-picturesequences should be decoded and rendered together with at least oneother sub-picture sequence. Thus signaling a level for a single one ofsuch sub-picture sequences may be not useful. Further, determining alevel value for each sub-picture may burden the encoder.

With the introduction of independently decodable sub-picture sequences,scenarios requiring independent extraction and decoding of certainregions of the pictures may not work based on tile groups. Thus theexplicit signaling of tile group IDs may not be useful. Further, thevalue of each of the PPS syntax elements pps_seq_parameter_set_id andloop_filter_across_tiles_enabled_flag should be the same in all PPSsreferred to by the tile group headers of a coded picture. This isbecause the active SPS should not change within a CVS, and the value ofloop_filter_across_tiles_enabled_flag should be the same for all tileswithin a picture for parallel processing based on tiles. Whether toallow mixing of rectangular and raster-scan tile groups within a pictureshould be clearly specified. Whether to allow for sub-pictures that arepart of different pictures and employ the same sub-picture ID in a CVSto use different tile group modes should also be specified. Thederivation process for temporal luma motion vector prediction may notenable treating sub-picture boundaries as picture boundaries in temporalmotion vector prediction (TMVP). Further, the luma sample bilinearinterpolation process, the luma sample 8-tap interpolation filteringprocess, and the chroma sample interpolation process may not beconfigured to treat sub-picture boundaries as picture boundaries inmotion compensation. Also, a mechanism for control of deblocking, SAO,and ALF filtering operations at sub-picture boundaries should also bespecified.

With the introduction of independently decodable sub-picture sequences,the loop_filter_across_tile_groups_enabled_flag may be less useful. Thisis because turning off in-loop filtering operations for parallelprocessing purposes may also be satisfied by settingloop_filter_across_tile_groups_enabled_flag equal to zero. Further,turning off in-loop filtering operations for enabling independentextraction and decoding of certain regions of the pictures may also besatisfied by setting loop_filter_across_sub_pic_enabled_flag equal tozero. Therefore, additionally specifying the processes for turning offin-loop filtering operations across tile group boundaries based onloop_filter_across_tile_groups_enabled_flag would unnecessarily burdenthe decoder and waste bits. In addition, the decoding process asspecified above may not enable turning off the ALF filtering operationsacross tile boundaries.

As such, the present disclosure includes designs for supportingsub-pictures based video coding. A sub-picture is a rectangular orsquare area within a picture that may or may not be decodedindependently using the same decoding process as a picture. Thedescriptions of the techniques are based on the Versatile Video Coding(VVC) standard. However, the techniques may also apply to other videocodec specifications.

In some examples, a size unit is signaled for the picture width andheight syntax elements and the list of sub-picturewidth/height/offset_x/offset_y syntax elements. All syntax elements aresignaled in the form of xxx_minus1. For example, when the size unit issixty four luma samples, a width value of ninety nine specifies apicture width of six thousand four hundred luma samples. The sameexample applies for other of these syntax elements. In another example,one or more of the following applies. A size unit may be signaled forthe picture width and height syntax elements in the form of xxxminus1.Such a size unit signaled for the list of sub-picturewidth/height/offset_x/offset_y syntax elements may be in the form ofxxx_minus1. In another example, one or more of the following applies. Asize unit for the picture width and the list of sub-picturewidth/offsetx syntax elements may be signaled in the form of xxx_minus1.A size unit for the picture height and the list of sub-pictureheight/offset_y syntax elements may be signaled in the form ofxxx_minus1. In another example, one or more of the following applies.The picture width and height syntax elements in the form of xxx_minus1may be signaled in units of minimum coding units. The sub-picturewidth/height/offset_x/offset_y syntax elements in the form of xxx_minus1may be signaled in units of CTUs or CTBs. The sub-picture width for eachsub-picture at the right picture boundary may be derived. Thesub-picture height for each sub-picture at the bottom picture boundarymay be derived. Other values of the sub-picturewidth/height/offset_x/offset_y may all be signaled in the bitstream. Inother examples, a mode for signaling of the widths and heights of thesub-pictures as well as their positions within the picture may be addedfor cases when the sub-pictures have a uniform size. The sub-pictureshave uniform size when they include the same sub-picture rows andsub-picture columns. In this mode, the number of sub-picture rows, thenumber of sub-picture columns, the width of each sub-picture column, andthe height of each sub-picture row may all be signaled.

In another example, signaling of the sub-picture width and height maynot be included in the PPS. The numtile_columns_minus1 andnumtile_rows_minus1 should be in the range of zero to one an integervalue such as a thousand twenty four, inclusive. In another example,when sub-pictures referring to the PPS have more than one tile, twosyntax elements conditioned by a presence flag may be signaled in thePPS. These syntax elements are employed for signaling the sub-picturewidth and height in units of CTBs and specify the size of allsub-pictures referring to the PPS.

In another example, additional information describing individualsub-pictures may also be signaled. A flag, such as asub_pic_treated_as_pic_flag[i], may be signaled for each sub-picturesequence to indicate whether the sub-pictures of the sub-picturesequence are treated as pictures in the decoding process for purposesother than in-loop filtering operations. The level to which asub-picture sequence conforms may only be signaled when thesub_pic_treated_as_pic_flag[i] is equal to one. A sub-picture sequenceis a CVS of sub-pictures with the same sub-picture ID. When thesub_pic_treated_as_pic_flag[i] is equal to one, the level of thesub-picture sequence may also be signaled. This can be controlled by aflag for the all the sub-picture sequences or by one flag per eachsub-picture sequence. In another example, sub-bitstream extraction maybe enabled without changing VCL NAL units. This can be accomplished byremoving explicit tile group ID signaling from the PPS. The semantics oftile_group_address are specified when rect_tile_group_flag is equal toone indicating rectangluar tile groups. The tile_group_address mayinclude the tile group index of the tile group among tile groups withinthe sub-picture.

In another example, the value of each of the PPS syntax elementspps_seq_parameter_set_id and loop_filter_across_tiles_enabled_flag shallbe the same in all PPSs referred to by the tile group headers of a codedpicture. Other PPS syntax elements may be different for different PPSsreferred to the tile group headers of a coded picture. The value ofsingle_tile_in_pic_flag may be different for different PPSs referred tothe tile group headers of a coded picture. This way, some pictures in aCVS may have only one tile, while some other pictures in a CVS may havemultiple tiles. This also allows some sub-pictures of a picture (e.g.,those that are very big) to have multiple tiles while other sub-picturesof the same picture (e.g., those that are very small) have only onetile.

In another example, a picture may include a mix of rectangular/squareand raster-scan tile groups. Accordingly, some sub-pictures of thepicture use the rectangular/square tile group mode, while othersub-pictures use the raster-scan tile group mode. This flexibility isbeneficial for bitstream merging scenarios. Alternatively, a constraintmay require that all sub-pictures of a picture shall use the same tilegroup mode. The sub-pictures from different pictures with the samesub-picture ID in a CVS may not use different tile group modes. Thesub-pictures from different pictures with the same sub-picture ID in aCVS may use different tile group modes.

In another example, when the sub_pic_treated_as_pic_flag[i] for asub-picure is equal to one, collocated motion vectors for temporalmotion vector prediction for the sub-picture are limited to come fromwithin the boundaries of the sub-picture. Accordingly, temporal motionvector prediction for the sub-picture is treated as if the sub-pictureboundaries were picture boundaries. Further, clipping operations arespecified as a part of the luma sample bilinear interpolation process,the luma sample 8-tap interpolation filtering process, and the chromasample interpolation process, to enable treating sub-picture boundariesas picture boundaries in motion compensation for sub-pictures for whichthe sub_pic_treated_as_pic_flag[i] is equal to one.

In another example, each sub-picture is associated with a signaled flag,such as a loop_filter_across_sub_pic_enabled_flag. The flag is employedfor control of in-loop filtering operations at the boundaries of thesub-picture and for control of the filtering operations in thecorresponding decoding processes. The deblocking filter process may notbe applied to coding sub-block edges and transform block edges thatcoincide with the boundaries of sub-pictures for whichloop_filter_across_sub_pic_enabled_flag is equal to zero. Alternatively,the deblocking filter process is not applied to coding sub-block edgesand transform block edges that coincide with the upper or leftboundaries of sub-pictures for whichloop_filter_across_sub_pic_enabled_flag is equal to zero. Alternatively,the deblocking filter process is not applied to coding sub-block edgesand transform block edges that coincide with the boundaries ofsub-pictures for which sub_pic_treated_as_pic_flag[i] is equal to one orzero. Alternatively, the deblocking filter process is not applied tocoding sub-block edges and transform block edges that coincide with theupper or left boundaries of sub-pictures. A clipping operation may bespecified to turn off the SAO filtering operation across the boundariesof a sub-picture when loop_filter_across_sub_pic_enabledflag for thesub-picture is equal to zero. A clipping operation may be specified toturn off the ALF filtering operation across the boundaries of thesub-picture when loop_filter_across_sub_pic_enabled_flag is equal tozero for a sub-picture. The loop_filter_across_tile_groups_enabled_flagmay also be removed from the PPS. Accordingly, when theloop_filter_across_tiles_enabled_flag is equal to zero, in-loopfiltering operations across tile group boundaries that are notsub-picture boundaries are not turned off. The loop filter operationsmay include deblocking, SAO, and ALF. In another example, a clippingoperation is specified to turn off the ALF filtering operation acrossthe boundaries of a tile when loop_filter_across_tiles_enabled_flag forthe tile is equal to zero.

One or more of the preceding examples may be implemented as follows. Asub-picture may be defined as a rectangular/square region of one or moretile groups or slices within a picture. The following divisions ofprocessing elements may form spatial or component-wise partitioning: thedivision of each picture into components, the division of each componentinto CTBs, the division of each picture into sub-pictures, the divisionof each sub-picture into tile columns within a sub-picture, the divisionof each sub-picture into tile rows within a sub-picture, the division ofeach tile column within a sub-picture into tiles, the division of eachtile row within a sub-picture into tiles, and the division of eachsub-picture into tile groups.

The process for CTB raster and tile scanning process within asub-picture may be as follows. The list ColWidth[i] for i ranging fromzero to numtilecolumns_minus1, inclusive, specifying the width of thei-th tile column in units of CTBs, may be derived as follows:

if( uniform_tile_spacing_flag ) for( i = 0; i <=num_tile_columns_minus1; i++ )  ColWidth[ i ] = ( ( i + 1 ) *SubPicWidthInCtbsY ) / ( num_tile_columns_minus1 + 1 ) −   ( i *SubPicWidthInCtbsY ) / ( num_tile_columns_minus1 + 1 ) else { ColWidth[num_tile_columns_minus1 ] = SubPicWidthInCtbsY (6-1) for( i = 0; i <num_tile_columns_minus1; i++ ) {  ColWidth[ i ] =tile_column_width_minus1[ i ] + 1  ColWidth[ num_tile_columns_minus1 ]−= ColWidth[ i ] } }

The list RowHeight[j] for j ranging from zero to numtile_rows_minus1,inclusive, specifying the height of the j-th tile row in units of CTBs,is derived as follows:

if( uniform_tile_spacing_flag ) for( j = 0; j <= num_tile_rows_minus1;j++ )  RowHeight[ j ] = ( ( j + 1 ) * SubPicHeightInCtbsY ) / (num_tile_rows_minus1 + 1 ) −   ( j * SubPicHeightInCtbsY ) / (num_tile_rows_minus1 + 1 ) else { RowHeight[ num_tile_rows_minus1 ] =SubPicHeightInCtbsY (6-2) for( j = 0; j < num_tile_rows_minus1; j++ ) { RowHeight[ j ] = tile_row_height_minus1[ j ] + 1  RowHeight[num_tile_rows_minus1 ] −= RowHeight[ j ] } }

The list ColBd[i] for i ranging from zero to num_tile_columns_minus1+1,inclusive, specifying the location of the i-th tile column boundary inunits of CTBs, is derived as follows:

for(ColBd[0]=0,i=0;i<=num_tile_columns_minus1;i++)

ColBd[i+1]=ColBd[i]+ColWidth[i]  (6-3)

The list RowBd[j] for j ranging from zero to num_tile_rows_minus1+1,inclusive, specifying the location of the j-th tile row boundary inunits of CTBs, is derived as follows:

for(RowBd[0]=0,j=0;j<=num_tile_rows_minus1;j++)

RowBd[j+1]=RowBd[j]+RowHeight[j]  (6-4)

The list CtbAddrRsToTs[ctbAddrRs] for ctbAddrRs ranging from zero toSubPicSizeInCtbsY−1, inclusive, specifying the conversion from a CTBaddress in CTB raster scan of a sub-picture to a CTB address in tilescan of the sub-picture, is derived as follows:

for( ctbAddrRs = 0; ctbAddrRs < SubPicSizeInCtbsY; ctbAddrRs++ ) { tbX =ctbAddrRs % SubPicWidthInCtbsY tbY = ctbAddrRs / SubPicWidthInCtbsY for(i = 0; i <= num_tile_columns_minus1; i++ )  if( tbX >= ColBd[ i ] )  tileX = i for( j = 0; j <= num_tile_rows_minus1; j++ ) (6-5)  if(tbY >= RowBd[ j ])   tileY = j CtbAddrRsToTs[ ctbAddrRs ] = 0 for( i =0; i < tileX; i++ )  CtbAddrRsToTs[ ctbAddrRs ] += RowHeight[ tileY ] *ColWidth[ i ] for( j = 0; j < tileY; j++ )  CtbAddrRsToTs[ ctbAddrRs ]+= SubPicWidthInCtbsY * RowHeight[ j ] CtbAddrRsToTs[ ctbAddrRs ] += (tbY − RowBd[ tileY ] ) * ColWidth[ tileX ] + tbX − ColBd[ tileX ] }

The list CtbAddrTsToRs[ctbAddrTs] for ctbAddrTs ranging from zero toSubPicSizeInCtbsY−1, inclusive, specifying the conversion from a CTBaddress in tile scan to a CTB address in CTB raster scan of asub-picture, is derived as follows:

for(ctbAddrRs=0;ctbAddrRs<SubPicSizeInCtbsY;ctbAddrRs++)  (6-6)

CtbAddrTsToRs[CtbAddrRsToTs[ctbAddrRs]]=ctbAddrRs

The list TileId[ctbAddrTs] for ctbAddrTs ranging from 0 toSubPicSizeInCtbsY−1, inclusive, specifying the conversion from a CTBaddress in tile scan of a sub-picture to a tile ID, is derived asfollows:

for(j=0,tileIdx=0;j<=num_tile_rows_minus1;j++)

for(i=0;i<=num_tile_columns_minus1;i++,tileIdx++)

for(y=RowBd[j];y<RowBd[j+1];y++)  (6-7)

for(x=ColBd[i];x<ColBd[i+1];x++)

TileId[CtbAddrRsToTs[y*SubPicWidthInCtbsY+x]]=tileIdx

The list NumCtusInTile[tileIdx] for tileIdx ranging from 0 toNumTilesInSubPic−1, inclusive, specifying the conversion from a tileindex to the number of CTUs in the tile, is derived as follows:

for(j=0,tileIdx=0;j<=num_tile_rows_minus1;j++)

for(i=0;i<=num_tile_columns_minus1;i++,tileIdx++)  (6-8)

NumCtusInTile[tileIdx]=ColWidth[i]*RowHeight[j]

The list FirstCtbAddrTs[tileIdx] for tileIdx ranging from zero toNumTilesInSubPic−1, inclusive, specifying the conversion from a tile IDto the CTB address in tile scan of the first CTB in the tile are derivedas follows:

for( ctbAddrTs = 0, tileIdx = 0, tileStartFlag = 1; ctbAddrTs <SubPicSizeInCtbsY; ctbAddrTs++ ) { if( tileStartFlag ) { FirstCtbAddrTs[ tileIdx ] = ctbAddrTs (6-9)  tileStartFlag = 0 }tileEndFlag = ctbAddrTs = = SubPicSizeInCtbsY − 1 | | TileId[ctbAddrTs + 1 ] != TileId[ ctbAddrTs ] if( tileEndFlag ) {  tileIdx++ tileStartFlag = 1 } }

The values of ColumnWidthInLumaSamples[i], specifying the width of thei-th tile column in units of luma samples, are set equal toColWidth[i]<<CtbLog2SizeY for i ranging from 0 tonumtile_columns_minus1, inclusive. The values ofRowHeightInLumaSamples[j], specifying the height of the j-th tile row inunits of luma samples, are set equal to RowHeight[j]<<CtbLog2SizeY for jranging from 0 to num_tile_rows_minus1, inclusive.

An example sequence parameter set RBSP syntax is as follows.

Descriptor seq_parameter_set_rbsp( ) {  sps_max_sub_layers_minus1 u(3) sps_reserved_zero_5 bits u(5)  profile_tier_level(sps_max_sub_layers_minus1 )  sps_seq_parameter_set_id ue(v) chroma_format_idc ue(v)  if( chroma_format_idc = = 3 )  separate_colour_plane_flag u(1)  pic_width_in_luma_samples ue(v) pic_height_in_luma_samples ue(v)  bit_depth_luma_minus8 ue(v) bit_depth_chroma_minus8 ue(v)  num_sub_pics_minus1 ue(v) sub_pic_id_len_minus1 ue(v)  if( num_sub_pics_minus1 > 0 )  sub_pic_level_present_flag u(1)  for ( i = 0; i <=num_sub_pics_minus1; i++ ){   sub_pic_id[ i ] u(v)   if(num_subpics_minus1 > 0 ){    sub_pic_treated_as_pic_flag[ i ] u(1)   if( sub_pic_treated_as_pic_flag[ i ] &&    sub_pic_level_present_flag)     sub_pic_level_idc[ i ] u(8)    sub_pic_x_offset[ i ] ue(v)   sub_pic_y_offset[ i ] ue(v)    sub_pic_width_in_luma_samples[ i ]ue(v)    sub_pic_height_in_luma_samples[ i ] ue(v)   }  } log2_max_pic_order_cnt_lsb_minus4 ue(v)  . . .

An example picture parameter set RBSP syntax is as follows.

Descriptor pic_parameter_set_rbsp( ) {  pps_pic_parameter_set_id ue(v) pps_seq_parameter_set_id ue(v)  loop_filter_across_sub_pic_enabled_flagu(1)  single_tile_in_sub_pic_flag u(1)  if( !single_tile_in_sub_pic_flag) {   num_tile_columns_minus1 ue(v)   num_tile_rows_minus1 ue(v)  uniform_tile_spacing_flag u(1)   if( !uniform_tile_spacing_flag ){   for( i = 0; i < num_tile_columns_minus1; i++ )    tile_column_width_minus1[i] ue(v)    for( i = 0; i <num_tile_rows_minus1; i++ )     tile_row_height_minus1[ i ] ue(v)   }  single_tile_per_tile_group_flag u(1)   if(!single_tile_per_tile_group_flag )    rect_tile_group_flag u(1)   if(rect_tile_group_flag &&   !single_tile_per_tile_group_flag ){   num_tile_groups_in_sub_pic_minus1 ue(v)    for( i = 0; i < =   num_tile_groups_in_sub_pic_minus1; i++ ) {     if( i > 0)    top_left_tile_idx[ i ] u(v)    bottom_right_tile_idx[ i ] u(v)    }  }   loop_filter_across_tiles_enabled_flag u(1)  }  for( i = 0; i < 2;i++ )   num_ref_idx_default_active_minus1[ i ] ue(v)

An example general tile group header syntax is as follows.

Descriptor tile_group_header( ) {  tile_group_pic_parameter_set_id ue(v) tile_group_sub_pic_id u(v)  if( NumTilesInSubPic > 1 | | !(rect_tile_group_flag &&    num_tile_group_in_sub_pic_minus1 = = 0 ) )  tile_group_address u(v)

An example coding tree unit syntax is as follows.

Descriptor coding_tree_unit( ) {  xCtb = ( ( CtbAddrInRs %SubPicWidthInCtbsY ) <<   CtbLog2SizeY ) + sub_pic_x_offset   [SubPicIdx[ tile_group_subpic_id ] ]  yCtb = ( ( CtbAddrInRs /SubPicWidthInCtbsY ) <<   CtbLog2SizeY ) +   sub_pic_y_offset[SubPicIdx[ tile_group_subpic_id ] ]  . . .

An example sequence parameter set RBSP semantics is as follows.

The bitdepthchromaminus8 specifies the bit depth of the samples of thechroma arrays BitDepthC and the value of the chroma quantizationparameter range offset QpBdOffsetC is as follows:

BitDepthC=8+bit_depth_chroma_minus8  (7-4)

QpBdOffsetC=6*bit_depth_chroma_minus8  (7-5)

The bit_depth_chroma_minus8 shall be in the range of zero to eight,inclusive.

The numsub_pics_minus1 plus one specifies the number of sub-pictures ineach coded picture in the CVS. The value of num_sub_pics_minus1 shall bein the range of zero to one thousand twenty four, inclusive. Thesub_pic_id_lenminus1 plus one specifies the number of bits used torepresent the syntax element sub_pic_id[i] in the SPS and the syntaxelement tile_group_sub_pic_id in the tile group headers. The value ofsub_pic_id_len_minus1 shall be in the range ofCeil(Log2(numsub_pic_minus1+1)−1 to nine, inclusive. Thesub_pic_level_present_flag is set to one to specify that the syntaxelement sub_pic_level_idc[i] may be present. Thesub_pic_level_present_flag is set to zero to specify that the syntaxelement sub_pic_level_idc[i] is not present. The sub_pic_id[i] specifiesthe sub-picture ID of the i-th sub-picture of each coded picture in theCVS. The length of sub_pic_id[i] is sub_pic_id_lenminus1+1 bits.

The sub_pic_treated_as_pic_flag[i] is set equal to one to specify thatthe i-th sub-picture of each coded picture in the CVS is treated as apicture in the decoding process excluding in-loop filtering operations.The sub_pic_treated_as_pic_flag[i] is set equal to zero to specify thatthe i-th sub-picture of each coded picture in the CVS is not treated asa picture in the decoding process excluding in-loop filteringoperations. The sub_pic_level_idc[i] indicates the level to which thei-th sub-picture sequence conforms, where the i-th sub-picture sequenceconsisting of only the VCL NAL units of the sub-pictures withsub-picture ID equal to sub_pic_id[i] in the CVS and their associatednon-VCL NAL units. The sub_pic_x_offset[i] specifies the horizontaloffset, in units of luma samples, of the top-left corner luma sample ofthe i-th sub-picture relative to the top-left corner luma sample of eachpicture in the CVS. When not present, the value of sub_pic_xoffset[i] isinferred to be equal to zero. The sub_pic_y_offset[i] specifies thevertical offset, in units of luma samples, of the top-left corner lumasample of the i-th sub-picture relative to the top-left corner lumasample of each picture in the CVS. When not present, the value ofsub_pic_y_offset[i] is inferred to be equal to zero. Thesub_pic_width_in_luma_samples[i] specifies the width, in units of lumasamples, of the i-th sub-picture of each picture in the CVS. When thesum of sub_pic_x_offset[i] and sub_pic_width_in_luma_samples[i] is lessthan pic_widthinlumasamples, the value ofsub_pic_width_in_luma_samples[i] shall be an integer multiple ofCtbSizeY. When not present, the value ofsub_pic_width_in_luma_samples[i] is inferred to be equal topic_widthinlumasamples. The sub_pic_height_in_luma_samples[i] specifiesthe height, in units of luma samples, of the i-th sub-picture for eachpicture in the CVS. When the sum of sub_pic_y_offset[i] andsub_pic_height_in_luma samples[i] is less thanpic_height_in_luma_samples, the value of sub_pic_height_in_lumasamples[i] shall be an integer multiple of CtbSizeY. When not present,the value of sub_pic_height_in_luma samples[i] is inferred to be equalto pic_height_in_luma_samples.

For bitstream conformance, the following constraints apply. For anyinteger values of i and j, when i is equal to j, the values ofsub_pic_id[i] and sub_pic_id[j] shall not be the same. For any twosub-pictures subpicA and subpicB, when the sub-picture ID of subpicA isless than the sub-picture ID of subpicB, any coded tile group NAL unitof subPicA shall succeed any coded tile group NAL unit of subPicB indecoding order. The shapes of the sub-pictures shall be such that eachsub-picture, when decoded, shall have its entire left boundary andentire top boundary consisting of a picture boundary or consisting ofboundaries of previously decoded sub-picture(s).

The list SubPicIdx[spld] for spld values equal to sub_pic_id[i] with iranging from 0 to numsub_pics_minus1, inclusive, specifying theconversion from a sub-picture ID to the sub-picture index, is derived asfollows:

for(i=0;i<=num_sub_pics_minus1;i++)

SubPicIdx[sub_pic_id[i]]=i  (7-5)

The log 2_max_pic_order_cnt_lsb_minus4 specifies the value of thevariable MaxPicOrderCntLsb that is used in the decoding process forpicture order count as follows:

MaxPicOrderCntLsb=2(log 2_max_pic_ordercntlsb_minus4+4)  (7-5)

The value of log 2_maxpic_order_cnt_lsb_minus4 shall be in the range ofzero to twelve, inclusive.

An example picture parameter set RBSP semantics is as follows.

When present, the value of each of the PPS syntax elementspps_seq_parameter_set_id and loop_filter_across_tiles_enabled_flag shallbe the same in all PPSs referred to by the tile group headers of a codedpicture. The pps_pic_parameter_set_id identifies the PPS for referenceby other syntax elements. The value of pps_pic_parameter_set_id shall bein the range of zero to sixty three, inclusive. Thepps_seq_parameter_set_id specifies the value of sps_seq_parameter_set_idfor the active SPS. The value of pps_seq_parameter_set_id shall be inthe range of zero to fifteen, inclusive. Theloop_filter_across_sub_pic_enabled_flag is set equal to one to specifythat in-loop filtering operations may be performed across the boundariesof the sub-picture referring to the PPS. Theloop_filter_across_sub_pic_enabled_flag is set equal to zero to specifythat in-loop filtering operations are not performed across theboundaries of the sub-picture referring to the PPS.

The single_tile_in_sub_pic_flag is set equal to one to specify thatthere is only one tile in each sub-picture referring to the PPS. Thesingle_tile_in_sub_pic_flag is set equal to zero to specify that thereis more than one tile in each sub-picture referring to the PPS. Thenumtile_columns_minus1 plus 1 specifies the number of tile columnspartitioning the sub-picture. The numtilecolumns_minus1 shall be in therange of zero to one thousand twenty four, inclusive. When not present,the value of numtile_columns_minus1 is inferred to be equal to zero. Thenumtile_rows_minus1 plus 1 specifies the number of tile rowspartitioning the sub-picture. The numtile_rows_minus1 shall be in therange of zero to one thousand twenty four. When not present, the valueof numtile_rows_minus1 is inferred to be equal to zero. The variableNumTilesInSubPic is set equal to (num_tile_columnsminus1+1)*(numtile_rows_minus1+1). When single_tile_insub_pic_flag isequal to zero, NumTilesInSubPic shall be greater than one.

The uniform_tile_spacing_flag is set equal to one to specify that tilecolumn boundaries and likewise tile row boundaries are distributeduniformly across the sub-picture. The uniform_tile_spacing_flag is setequal to zero to specify that tile column boundaries and likewise tilerow boundaries are not distributed uniformly across the sub-picture butsignaled explicitly using the syntax elementstile_column_width_minus1[i] and tile_row_height_minus1[i]. When notpresent, the value of uniform_tile_spacing_flag is inferred to be equalto one. The tile_columnwidthminus1[i] plus 1 specifies the width of thei-th tile column in units of CTBs. The tile_row_height_minus1[i] plus 1specifies the height of the i-th tile row in units of CTBs. Thesingle_tile_per_tile_group is set equal to one to specify that each tilegroup that refers to this PPS includes one tile. Thesingle_tile_per_tile_group is set equal to zero to specify that a tilegroup that refers to this PPS may include more than one tile.

The rect_tile_group_flag is set equal to zero to specify that tileswithin each tile group of the sub-picture are in raster scan order andthe tile group information is not signaled in PPS. Therecttilegroup_flag is set equal to one to specify that tiles within eachtile group cover a rectangular/square region of the sub-picture and thetile group information is signaled in the PPS. Whensingle_tile_per_tile_group_flag is set to one rect_tile_group_flag isinferred to be equal to one. The num_tile_groups_in_sub_pic_minus1 plus1 specifies the number of tile groups in each sub-picture referring tothe PPS. The value of num_tile_groups_in_sub_pic_minus1 shall be in therange of zero to NumTilesInSubPic−1, inclusive. When not present andsingle_tile_per_tile_group_flag is equal to one, the value ofnumtile_groups_in_sub_pic_minus1 is inferred to be equal toNumTilesInSubPic−1.

The top_left_tile_idx[i] specifies the tile index of the tile located atthe top-left corner of the i-th tile group of the sub-picture. The valueof top_left_tile_idx[i] shall not be equal to the value oftop_left_tile_idx[j] for any i not equal to j. When not present, thevalue of top_left_tile_idx[i] is inferred to be equal to i. The lengthof the top_left_tile_idx[i] syntax element isCeil(Log2(NumTilesInSubPic) bits. The bottom_right_tile_idx[i] specifiesthe tile index of the tile located at the bottom-right corner of thei-th tile group of the sub-picture. When single_tile_per_tile_group_flagis set to one, the bottom_right_tile_idx[i] is inferred to be equal totop_left_tile_idx[i]. The length of the bottom_right_tile_idx[i] syntaxelement is Ceil(Log2(NumTilesInSubPic)) bits.

It is a requirement of bitstream conformance that any particular tileshall only be included in one tile group. The variableNumTilesInTileGroup[i], which specifies the number of tiles in the i-thtile group of the sub-picture, and related variables, are derived asfollows:

deltaTileIdx=bottom_right_tile_idx[i]−top_left_tile_idx[i]

NumTileRowsInTileGroupMinus1[i]=deltaTileIdx/(num_tile_columns_minus1+1)

NumTileColunmsInTileGroupMinus1[i]=deltaTileIdx%

(num_tile_columns_minus1+1)  (7-33)

NumTilesInTileGroup[i]=(NumTileRowsInTileGroupMinus1[i]+1)*(NumTileColumnsInTileGroupMinus1[i]+1)

The loop_filter_across_tiles_enabled_flag is set equal to one to specifythat in-loop filtering operations may be performed across tileboundaries in sub-pictures referring to the PPS. Theloop_filter_across_tiles_enabled_flag is set equal to zero to specifythat in-loop filtering operations are not performed across tileboundaries in sub-pictures referring to the PPS. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. When not present, the value ofloop_filter_across_tiles_enabled_flag is inferred to be equal to one.The num_ref_idx_default_active_minus1[i] plus 1, when i is equal tozero, specifies the inferred value of the variable NumRefIdxActive[0]for P or B tile groups with num_ref idx_active_override_flag equal to 0,and, when i is equal to one, specifies the inferred value ofNumRefIdxActive[1] for B tile groups with num refidxactive_override_flag equal to zero. The value of num refidxdefault_active_minus1[i] shall be in the range of zero to fourteen,inclusive.

An example general tile group header semantics is as follows. Whenpresent, the value of each of the tile group header syntax elementstile_group_pic_order_cnt_lsb and tile_group_temporal_mvp_enabled_flagshall be the same in all tile group headers of a coded picture. Whenpresent, the value of the tile_group_pic_parameter_set_id shall be thesame in all tile group headers of a coded sub-picture. Thetile_group_pic_parameter_set_id specifies the value ofpps_pic_parameter_set_id for the PPS in use. The value oftile_group_pic_parameter_set_id shall be in the range of zero to sixtythree, inclusive. It is a requirement of bitstream conformance that thevalue of TemporalId of the current picture shall be greater than orequal to the value of TemporalId of each PPS referred to by a tile groupof the current picture. The tile_group_sub_pic_id identifies thesub-picture to which the tile group belongs. The length oftile_group_sub_pic_id is sub_pic_id_len_minus1+1 bits. The value oftile_group_sub_pic_id shall be the same for all tile group headers of acoded sub-picture.

The variables SubPicWidthInCtbsY, SubPicHeightInCtbsY, andSubPicSizeInCtbsY are derived as follows:

i=SubPicIdx[tile_group_subpic_id]

SubPicWidthInCtbsY=

Ceil(sub_pic_width_in_luma_samples[i]÷CtbSizeY)  (7-34)

SubPicHeightInCtbsY=Ceil(sub_pic_height_in_luma_samples[i]÷CtbSizeY)

SubPicSizeInCtbsY=SubPicWidthInCtbsY*SubPicHeightInCtbsY

The following variables are derived by invoking the CTB raster and tilescanning conversion process: the list ColWidth[i] for i ranging fromzero to numtile_columns_minus1, inclusive, specifying the width of thei-th tile column in units of CTBs; the list RowHeight[j] for j rangingfrom zero to num_tile_rows_minus1, inclusive, specifying the height ofthe j-th tile row in units of CTBs; the list ColBd[i] for i ranging fromzero to num_tile_columns_minus1+1, inclusive, specifying the location ofthe i-th tile column boundary in units of CTBs; the list RowBd[j] for jranging from zero to num_tile_rows_minus1+1, inclusive, specifying thelocation of the j-th tile row boundary in units of CTBs; the listCtbAddrRsToTs [ctbAddrRs] for ctbAddrRs ranging from zero toSubPicSizeInCtbsY−1, inclusive, specifying the conversion from a CTBaddress in the CTB raster scan of a sub-picture to a CTB address in thetile scan of the sub-picture; the list CtbAddrTsToRs[ctbAddrTs] forctbAddrTs ranging from zero to SubPicSizeInCtbsY−1, inclusive,specifying the conversion from a CTB address in the tile scan of asub-picture to a CTB address in the CTB raster scan of the sub-picture;the list Tileld[ctbAddrTs] for ctbAddrTs ranging from zero toSubPicSizeInCtbsY−1, inclusive, specifying the conversion from a CTBaddress in tile scan of a sub-picture to a tile ID; the listNumCtusInTile[tileIdx] for tileIdx ranging from zero toNumTilesInSubPic−1, inclusive, specifying the conversion from a tileindex to the number of CTUs in the tile; the listFirstCtbAddrTs[tileIdx] for tileIdx ranging from zero toNumTilesInSubPic−1, inclusive, specifying the conversion from a tile IDto the CTB address in tile scan of the first CTB in the tile; the listColumnWidthlnLumaSamples[i] for i ranging from zero to num_tilecolumns_minus1, inclusive, specifying the width of the i-th tile columnin units of luma samples; and the list RowHeightlnLumaSamples[j] for jranging from zero to numtile_rows_minus1, inclusive, specifying theheight of the j-th tile row in units of luma samples.

The values of ColumnWidthlnLumaSamples[i] for i ranging from zero tonumtile_columns_minus1, inclusive, and RowHeightInLumaSamples[j] for jranging from zero to numtilerows_minus1, inclusive, shall all be greaterthan zero. The variables SubPicLeftBoundaryPos, SubPicTopBoundaryPos,SubPicRightBoundaryPos and SubPicBotBoundaryPos are derived as follows:

i = SubPicIdx[ tile_group_subpic_id ] if( sub_pic_treated_as_pic_flag[ i] ) { SubPicLeftBoundaryPos = sub_pic_x_offset[ i ]SubPicRightBoundaryPos = SubPicLeftBoundaryPos +sub_pic_width_in_luma_samples[ i ] − 1 SubPicTopBoundaryPos =sub_pic_y_offset[ i ] SubPicBotBoundaryPos = SubPicTopBoundaryPos +sub_pic_height_in_luma_samples[ i ] − 1 (7-34) }

For each tile, with index i=0. NumTilesInSubPic−1 in the currentsub-picture, the variables TileLeftBoundaryPos[i],TileTopBoundaryPos[i], TileRightBoundaryPos[i], andTileBotBoundaryPos[i] are derived as follows:

tile_(ColIdx=i)%(numtile_columns_minus1+1)

tileRowIdx=i/(numtile_columns_minus1+1)

TileLeftBoundaryPos[i]=SubPicLeftBoundaryPos+(ColBd[tileColIdx]<<

Ctb Log 2SizeY))

TileRightBoundaryPos[i]=SubPicLeftBoundaryPos+

((ColBd[tileColIdx]+ColWidth[tileColIdx])<<Ctb Log 2SizeY)−1

if(TileRightBoundaryPos[i]>pic_widthinlumasamples−1)  (7-41)

TileRightBoundaryPos[i]=pic_width_in_luma_samples−1

TileTopBoundaryPos[i]=SubPicTopBoundaryPos+(RowBd[tileRowIdx]<<

Ctb Log 2SizeY)

TileBotBoundaryPos[i]=SubPicTopBoundaryPos+

((RowBd[tileRowIdx]+RowHeight[tileRowIdx])<<Ctb Log 2SizeY)−1

if(TileBotBoundaryPos[i]>pic_height_in_luma_samples−1)

TileBotBoundaryPos[i]=pic_height_in_luma_samples−1

The tile_group_address specifies the tile address of the first tile inthe tile group. When not present, the value of tilegroup_address isinferred to be equal to zero. If recttile_group_flag is equal to 0, thefollowing applies: the tile address is the tile ID; the length oftile_group_address is Ceil(Log2 (NumTilesInSubPic)) bits; and the valueof tile_group_address shall be in the range of zero toNumTilesInSubPic−1, inclusive. Otherwise (recttile_group_flag is equalto one), the following applies: the tile address is the tile group indexof the tile group among tile groups in the sub-picture; the length oftile_group_address is Ceil(Log2 (num_tile_groups_in_sub_pic_minus1+1))bits; and the value of tile_group_address shall be in the range of 0 tonum_tile_groups_in_sub_pic_minus1, inclusive.

It is a requirement of bitstream conformance that the followingconstraints apply. The value of tile_group_address shall not be equal tothe value of tile_group_address of any other coded tile group NAL unitof the same coded sub-picture. The tile groups of a sub-picture shall bein increasing order of their tile_group_address values. The shapes ofthe tile groups of a sub-picture shall be such that each tile, whendecoded, shall have its entire left boundary and entire top boundaryconsisting of a sub-picture boundary or consisting of boundaries ofpreviously decoded tile(s).

The numtiles_intile_group_minus1, when present, specifies the number oftiles in the tile group minus one. The value ofnum_tiles_in_tile_group_minus1 shall be in the range of zero toNumTilesInSubPic−1, inclusive. When not present, the value ofnum_tiles_in_tile_group_minus1 is inferred to be equal to zero. Thevariable NumTilesInCurrTileGroup, which specifies the number of tiles inthe current tile group, and TgTileIdx[i], which specifies the tile indexof the i-th tile in the current tile group, are derived as follows:

if( rect_tile_group_flag ) { NumTilesInCurrTileGroup =NumTilesInTileGroup[ tile_group_address ] tileIdx = top_left_tile_idx[tile_group_address ] for( j = 0, tIdx = 0; j < NumTileRowsInTileGroupMinus1[ tile_group_address ] + 1; (7-35)    j++,tileIdx += num_tile_columns_minus1 + 1 )  for( i = 0, currTileIdx =tileIdx; i < NumTileColunmsInTileGroupMinus1[ tile_group_address ] + 1;    i++, currTileIdx++, tIdx++ )   TgTileIdx[ tIdx ] = currTileIdx }else { NumTilesInCurrTileGroup = num_tiles_in_tile_group_minus1 + 1TgTileIdx[ 0 ] = tile_group_address for( i = 1; i <NumTilesInCurrTileGroup; i++ )  TgTileIdx[ i ] = TgTileIdx[ i − 1 ] + 1}The tile_group_type specifies the coding type of the tile group.

An example derivation process for temporal luma motion vector predictionis as follows. The variables mvLXCol and availableFlagLXCol are derivedas follows: If tile_group_temporal_mvp_enabled_flag is equal to zero,both components of mvLXCol are set equal to zero and availableFlagLXColis set equal to zero. Otherwise (tile_group_temporal_mvp_enabled_flag isequal to one), the following ordered steps apply: The bottom rightcollocated motion vector, and the bottom and right boundary samplelocations are derived as follows:

xColBr=xCb+cbWidth  (8-414)

yColBr=yCb+cbHeight  (8-415)

rightBoundaryPos=sub_pic_treated_as_pic_flag[SubPicIdx[tile_group_subpic_id]]?

SubPicRightBoundaryPos:pic_width_in_luma_samples−1  (8-415)

botBoundaryPos=sub_pic_treated_as_pic_flag[SubPicIdx[tile_group_subpic_id]]

SubPicBotBoundaryPos:pic_height_in_luma_samples−1  (8-415)

If yCb>>CtbLog2SizeY is equal to yColBr>>CtbLog2SizeY, yColBr is lessthan or equal to botBoundaryPos and xColBr is less than or equal torightBoundaryPos, the following applies: The variable colCb specifiesthe luma coding block covering the modified location given by((xColBr>>3)<<3, (yColBr>>3)<<3) inside the collocated picture specifiedby ColPic. The luma location (xColCb, yColCb) is set equal to thetop-left sample of the collocated luma coding block specified by colCbrelative to the top-left luma sample of the collocated picture specifiedby ColPic. The derivation process for collocated motion vectors isinvoked with currCb, colCb, (xColCb, yColCb), refIdxLX and sbFlag setequal to zero as inputs, and the output is assigned to mvLXCol andavailableFlagLXCol. Otherwise, both components of mvLXCol are set equalto zero and availableFlagLXCol is set equal to zero.

An example luma sample bilinear interpolation process is as follows. Theluma locations in full-sample units (xInti, yInti) are derived asfollows for i=0.1. Ifsub_pic_treated_as_pic_flag[SubPicIdx[tile_group_subpic_id] ] is equalto 1, the following applies:

xInti=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,xIntL+i)  (8-458)

yInti=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,yIntL+i)  (8-458)

Otherwise (sub_pic_treated_as_pic_flag[SubPicIdx[tile_group_subpic_id] ]is equal to 0), the following applies:

xInti=sps_ref_wraparound_enabled_flag?

ClipH((sps_ref_wraparound_offset_minus1+1)*MinCbSizeY,picW,(xIntL+i  (8-459)

Clip3(0,picW−1,xIntL+i)

yInti=Clip3(0,picH−1,yIntL+i)  (8-460)

An example luma sample 8-tap interpolation filtering process is asfollows. The luma locations in full-sample units (xInti, yInti) arederived as follows for i=0.7. Ifsubpic_treated_aspic_flag[SubPicIdx[tile_group_subpic_id] ] is equal toone, the following applies:

xInti=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,xIntL+i−3)  (8-830)

yInti=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,yIntL+i−3)  (8-830)

Otherwise (subpic_treated_as_pic_flag[SubPicIdx[tile_group_subpic_id] ]is equal to 0), the following applies:

xInti=sps_ref_wraparound_enabled_flag?

ClipH((sps_ref_wraparound_offset_minus1+1)*MinCbSizeY,picW,xIntL+i−3):  (8-831)

Clip3(0,picW−1,xIntL+i−3)

yInti=Clip3(0,picH−1,yIntL+i−3)  (8-832)

An example chroma sample interpolation process is as follows. Thevariable xOffset is set equal to (sps_refwraparound_offset_minus1+1)*MinCbSizeY)/SubWidthC. The chroma locationsin full-sample units (xInti, yInti) are derived as follows for i=0.3:

If sub_pic_treated_aspic_flag[SubPicIdx[tile_group_subpic_id] ] is equalto one, the following applies:

xInti=Clip3(SubPicLeftBoundaryPos/SubWidthC,SubPicRightBoundaryPos/SubWidthC,xIntL+i)  (8-844)

yInti=Clip3(SubPicTopBoundaryPos/SubHeightC,SubPicBotBoundaryPos/SubHeightC,yIntL+i)  (8-844)

Otherwise (sub_pic_treated_as_pic_flag[SubPicIdx[tile_group_subpic_id] ]is equal to 0), the following applies:

xInti=sps_ref_wraparound_enabled_flag?ClipH(xOffset,picWC,xIntC+i−1):  (8-845)

Clip3(0,picWC−1,xIntC+i−1)

yInti=Clip3(0,picHC−1,yIntC+i−1)  (8-846)

An example deblocking filter process is as follows. The deblockingfilter process is applied to all coding sub-block edges and transformblock edges of a picture, except the following types of edges: edgesthat are at the boundary of the picture; edges that coincide withboundaries of sub-pictures for whichloop_filter_across_sub_pic_enabled_flag is equal to zero; edges thatcoincide with boundaries of tiles for whichloop_filter_across_tiles_enabled_flag is equal to zero; edges thatcoincide with the upper or left boundaries of or within tile groups withtile_group_deblocking_filter_disabled_flag equal to one; edges that donot correspond to 8×8 sample grid boundaries of the consideredcomponent; edges within chroma components for which both sides of theedge use inter prediction; edges of chroma transform blocks that are notedges of the associated transform unit; and edges across the lumatransform blocks of a coding unit that has an IntraSubPartitionsSplitvalue not equal to ISP_NO_SPLIT.

An example deblocking filter process for one direction is as follows.For each coding unit with coding block width log 2CbW, coding blockheight log 2CbH and location of top-left sample of the coding block(xCb, yCb), when edgeType is equal to EDGE_VER and xCb % 8 is equal zeroor when edgeType is equal to EDGE_HOR and yCb % 8 is equal to zero, theedges are filtered by the following ordered steps. The coding blockwidth nCbW is set equal to 1<<log 2CbW and the coding block height nCbHis set equal to 1<<log 2CbH. The variable filterEdgeFlag is derived asfollows. If edgeType is equal to EDGE_VER and one or more of thefollowing conditions are true, filterEdgeFlag is set equal to zero. Theleft boundary of the current coding block is the left boundary of thepicture. The left boundary of the current coding block is the left orright boundary of the sub-picture andloop_filter_across_sub_pic_enabled_flag is equal to zero. The leftboundary of the current coding block is the left boundary of the tileand loop_filter_across_tiles_enabled_flag is equal to zero. Otherwise ifedgeType is equal to EDGE_HOR and one or more of the followingconditions are true, the variable filterEdgeFlag is set equal to 0. Thetop boundary of the current luma coding block is the top boundary of thepicture. The top boundary of the current coding block is the top orbottom boundary of the sub-picture andloop_filter_across_sub_pic_enabled_flag is equal to zero. The topboundary of the current coding block is the top boundary of the tile andloop_filter_across_tiles_enabled_flag is equal to zero. Otherwise,filterEdgeFlag is set equal to one.

An example CTB modification process is as follows. For all samplelocations (xSi, ySj) and (xYi, yYj) with i=0.nCtbSw−1 and j=0.nCtbSh−1,depending on the values ofpcm_loop_filter_disabled_flag,pcm_flag[xYi][yYj] and cu_transquant_bypass_flag of the coding unitwhich includes the coding block covering recPicture[xSi][ySj], thefollowing applies. If one or more of the following conditions for allsample locations (xSik′, ySjk′) and (xYik′, yYjk′) with k=0.1 are true,edgeIdx is set equal to 0. The sample at location (xSik′, ySjk′) isoutside the picture boundaries. The sample at location (xSik′, ySjk′)belongs to a different sub-picture andloop_filter_across_sub_pic_enabled_flag in the tile group which thesample recPicture[xSi] [ySj] belongs to is equal to 0. Theloop_filter_across_tiles_enabled_flag is equal to zero and the sample atlocation (xSik′, ySjk′) belongs to a different tile.

An example coding tree block filtering process for luma samples is asfollows. For the derivation of the filtered reconstructed luma samplesalfPictureL[x][y], each reconstructed luma sample inside the currentluma coding tree block recPictureL[x][y] is filtered as follows with x,y=0. CtbSizeY−1. The locations (hx, vy) for each of the correspondingluma samples (x, y) inside the given array recPicture of luma samplesare derived as follows. If loop_filter_across_tiles_enabled_flag for thetile tileA containing the luma sample at location (hx, vy) is equal tozero, let the vaiable tileIdx be the tile index of tileA, the followingapplies:

hx=Clip3(TileLeftBoundaryPos[tileIdx],TileRightBoundaryPos[tileIdx],xCtb+x)  (8-1140)

vy=Clip3(TileTopBoundaryPos[tileIdx],TileBotBoundaryPos[tileIdx],yCtb+y)  (8-1141)

Otherwise, if loop_filter_across_sub_pic_enabled_flag in the sub-picturecontaining the luma sample at location (hx, vy) is equal to zero, thefollowing applies:

hx=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,xCtb+x)  (8-1140)

vy=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,yCtb+y)  (8-1141)

Otherwise, the following applies:

hx=Clip3(0,pic_widthinlumasamples−1,xCtb+x)  (8-1140)

vy=Clip3(0,pic_height_in_luma_samples−1,yCtb+y)  (8-1141)

An example derivation process for ALF transpose and filter index forluma samples is as follows. The locations (hx, vy) for each of thecorresponding luma samples (x, y) inside the given array recPicture ofluma samples are derived as follows. If loop_filter_across_tiles_enabled_flag for the tile tileA containing the luma sample atlocation (hx, vy) is equal to zero, let the tileIdx be the tile index oftileA, the following applies:

hx=Clip3(TileLeftBoundaryPos[tileIdx],TileRightBoundaryPos[tileIdx],x)  (8-1140)

vy=Clip3(TileTopBoundaryPos[tileIdx],TileBotBoundaryPos[tileIdx],y)  (8-1141)

Otherwise, if loop_filter_across_sub_pic_enabled_flag for thesub-picture containing the luma sample at location (hx, vy) is equal tozero, the following applies:

hx=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,x)  (8-1140)

vy=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,y)  (8-1141)

Otherwise, the following applies:

hx=Clip3(0,pic_widthinlumasamples−1,x)  (8-1145)

vy=Clip3(0,pic_height_in_luma_samples−1,y)  (8-1146)

An example coding tree block filtering process for chroma samples is asfollows. For the derivation of the filtered reconstructed chroma samplesalfPicture[x][y], each reconstructed chroma sample inside the currentchroma coding tree block recPicture[x][y] is filtered as follows with x,y=0.ctbSizeC−1. The locations (hx, vy) for each of the correspondingchroma samples (x, y) inside the given array recPicture of chromasamples are derived as follows. If loop_filter_across_tiles_enabled_flagfor the tile tileA containing the chroma sample at location (hx, vy) isequal to zero, let the tileIdx be the tile index oftileA, the followingapplies:

hx=Clip3(TileLeftBoundaryPos[tileIdx]/SubWidthC,

TileRightBoundaryPos[tileIdx]/SubWidthC,xCtb+x)  (8-1140)

vy=Clip3(TileTopBoundaryPos[tileIdx]/SubWidthC,

TileBotBoundaryPos[tileIdx]/SubWidthC,yCtb+y)  (8-1141)

Otherwise, if loop_filter_across_sub_pic_enabled_flag for thesub-picture containing the chroma sample at location (hx, vy) is equalto zero, the following applies:

hx=Clip3(SubPicLeftBoundaryPos/SubWidthC,

SubPicRightBoundaryPos/SubWidthC,xCtb+x)  (8-1140)

vy=Clip3(SubPicTopBoundaryPos/SubWidthC,

SubPicBotBoundaryPos/SubWidthC,yCtb+y)  (8-1141)

Otherwise, the following applies:

hx=Clip3(0,pic_widthinlumasamples/SubWidthC−1,xCtbC+x)  (8-1177)

vy=Clip3(0,pic_height_in_luma_samples/SubHeightC−1,yCtbC+y)  (8-1178)

The variable sum is derived as follows:

sum=AlfCoeffC[0]*(recPicture[hx,vy+2]+recPicture[hx,vy−2])+

AlfCoeffC[1]*(recPicture[hx+1,vy+1]+recPicture[hx−1,vy−1])+

AlfCoeffC[2]*(recPicture[hx,vy+1]+recPicture[hx,vy−1])+  (8-1179)

AlfCoeffC[3]*(recPicture[hx−1,vy+1]+recPicture[hx+1,vy−1])+

AlfCoeffC[4]*(recPicture[hx+2,vy]+recPicture[hx−2,vy])+

AlfCoeffC[5]*(recPicture[hx+1,vy]+recPicture[hx−1,vy])+

AlfCoeffC[6]*recPicture[hx,vy]

sum=(sum+64)>>7  (8-1180)

The modified filtered reconstructed chroma picture samplealfPicture[xCtbC+x][yCtbC+y] is derived as follows:

alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1<<BitDepthC)−1,sum)  (8-1181)

FIG. 12 is a schematic diagram of an example video coding device 1200.The video coding device 1200 is suitable for implementing the disclosedexamples/embodiments as described herein. The video coding device 1200comprises downstream ports 1220, upstream ports 1250, and/or transceiverunits (Tx/Rx) 1210, including transmitters and/or receivers forcommunicating data upstream and/or downstream over a network. The videocoding device 1200 also includes a processor 1230 including a logic unitand/or central processing unit (CPU) to process the data and a memory1232 for storing the data. The video coding device 1200 may alsocomprise electrical, optical-to-electrical (OE) components,electrical-to-optical (EO) components, and/or wireless communicationcomponents coupled to the upstream ports 1250 and/or downstream ports1220 for communication of data via electrical, optical, or wirelesscommunication networks. The video coding device 1200 may also includeinput and/or output (I/O) devices 1260 for communicating data to andfrom a user. The I/O devices 1260 may include output devices such as adisplay for displaying video data, speakers for outputting audio data,etc. The I/O devices 1260 may also include input devices, such as akeyboard, mouse, trackball, etc., and/or corresponding interfaces forinteracting with such output devices.

The processor 1230 is implemented by hardware and software. Theprocessor 1230 may be implemented as one or more CPU chips, cores (e.g.,as a multi-core processor), field-programmable gate arrays (FPGAs),application specific integrated circuits (ASICs), and digital signalprocessors (DSPs). The processor 1230 is in communication with thedownstream ports 1220, Tx/Rx 1210, upstream ports 1250, and memory 1232.The processor 1230 comprises a coding module 1214. The coding module1214 implements the disclosed embodiments described herein, such asmethods 100, 1300, and 1400, which may employ an in-loop filter 1000, abitstream 1100, a picture 500, and/or current blocks 801 and/or 901which may be coded according to unidirectional inter-prediction 600and/or bidirectional inter-prediction 700 based on a candidate listgenerated according to pattern 900. The coding module 1214 may alsoimplement any other method/mechanism described herein. Further, thecoding module 1214 may implement a codec system 200, an encoder 300,and/or a decoder 400. For example, the coding module 1214 can implementthe first, second, third, fourth, fifth, and/or sixth exampleimplementation as described above. Hence, coding module 1214 causes thevideo coding device 1200 to provide additional functionality and/orcoding efficiency when coding video data. As such, the coding module1214 improves the functionality of the video coding device 1200 as wellas addresses problems that are specific to the video coding arts.Further, the coding module 1214 effects a transformation of the videocoding device 1200 to a different state. Alternatively, the codingmodule 1214 can be implemented as instructions stored in the memory 1232and executed by the processor 1230 (e.g., as a computer program productstored on a non-transitory medium).

The memory 1232 comprises one or more memory types such as disks, tapedrives, solid-state drives, read only memory (ROM), random access memory(RAM), flash memory, ternary content-addressable memory (TCAM), staticrandom-access memory (SRAM), etc. The memory 1232 may be used as anover-flow data storage device, to store programs when such programs areselected for execution, and to store instructions and data that are readduring program execution.

FIG. 13 is a flowchart of an example method 1300 of encoding a videosequence into a bitstream, such as bitstream 1100, by excludingcollocated motion vectors when a sub-picture, such as sub-picture 510,is treated as a picture, such as picture 500. Method 1300 may beemployed by an encoder, such as a codec system 200, an encoder 300,and/or a video coding device 1200 when performing method 100 to encode acurrent block 801 and/or 901 according to unidirectionalinter-prediction 600 and/or bidirectional inter-prediction 700 byemploying in-loop filter 1000 and/or on a candidate list generatedaccording to pattern 900.

Method 1300 may begin when an encoder receives a video sequenceincluding a plurality of pictures and determines to encode that videosequence into a bitstream, for example based on user input. At step1301, the video sequence is partitioned into a current picture. Thecurrent picture is partitioned into a sub-picture. Further, thesub-picture is partitioned into a current block. At step 1303, theencoder determines to encode the current block according tointer-prediction.

At step 1305, the encoder obtains a plurality of coded blocks. The codedblocks may be included in the same picture as the current block and maybe positioned adjacent to the current block. For example, the codedblocks may be positioned above and/or to the left of the current block.The coded blocks may also include a collocated block. A collocated blockis positioned in a different picture than the current block (e.g., in anadjacent picture). The current block includes a position in the currentpicture, and the collocated block may include the same position in adifferent picture. The coded blocks may all have been previously encodedaccording to inter-prediction prior to step 1305. Hence, the codedblocks contain motion vectors that can be employed as candidate motionvectors for the current block of the sub-picture.

At step 1307, the encoder derives a candidate list of candidate motionvectors for the current block. This is accomplished by excludingcollocated motion vectors from the candidate list that are included inthe collocated block when such collocated motion vectors point outsideof the sub-picture. This approach is employed when a flag is set toindicate the sub-picture is treated as a picture. In this context, asub-picture is treated as a picture when the sub-picture is codedwithout reference to data in other sub-pictures, and hence can beseparately extracted. For example, the flag may be denoted as asubpic_treated_as_pic_flag[i] where i is an index of the sub-picture. Asa specific example, the subpic_treated_as_pic_flag[i] may be set equalto one to specify that an i-th sub-picture of each coded picture in aCVS is treated as a picture in a encoding process. Such treatment may beexclusive of in-loop filtering operations which may be managed by othermechanisms.

In some examples, the candidate list of motion vectors for the currentblock is derived according to temporal luma motion vector prediction.The temporal luma motion vector prediction may be performed accordingto:

xColBr=xCb+cbWidth;

yColBr=yCb+cbHeight;

rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?

SubPicRightBoundaryPos:pic_width_in_luma_samples−1; and

botBoundaryPos=subpic_treated_aspic_flag[SubPicIdx]?

SubPicBotBoundaryPos:pic_height_in_luma samples−1,

where xColBr and yColBR specify a location of the collocated block, xCband yCb specify a top left sample of the current block relative to a topleft sample of the current picture, cbWidth is a width of the currentblock, cbHeight is a height of the current block, SubPicRightBoundaryPosis a position of a right boundary of the sub-picture,SubPicBotBoundaryPos is a position of a bottom boundary of thesub-picture, pic_width_in_luma samples is a width of the current picturemeasured in luma samples, pic_height_in_luma samples is a height of thecurrent picture measured in luma samples, botBoundaryPos is a computedposition of the bottom boundary of the sub-picture, rightBoundaryPos isa computed position of the right boundary of the sub-picture, SubPicIdxis an index of the sub-picture, and wherein collocated motion vectorsare excluded when yCb>>CtbLog2SizeY is not equal toyColBr>>CtbLog2SizeY, and where CtbLog2SizeY indicates a size of acoding tree block.

At step 1309, a current motion vector for the current block is selectedfrom the candidate list of candidate motion vectors. The encoder canthen encode the current block into a bitstream based on the currentmotion vector. In some examples, the current block is a luma block ofluma samples. Further, the current motion vector may be a temporal lumamotion vector pointing to reference luma samples in a reference block.Accordingly, the current block is encoded based on the reference lumasamples.

At step 1311, the flag can be encoded into a SPS in the bitstream.Further, the bitstream is stored for communication toward a decoder.

FIG. 14 is a flowchart of an example method 1400 of decoding a videosequence from a bitstream, such as bitstream 1100, by excludingcollocated motion vectors when a sub-picture, such as sub-picture 510,is treated as a picture, such as picture 500. Method 1400 may beemployed by a decoder, such as a codec system 200, a decoder 400, and/ora video coding device 1200 when performing method 100 to decode acurrent block 801 and/or 901 according to unidirectionalinter-prediction 600 and/or bidirectional inter-prediction 700 byemploying in-loop filter 1000 and/or on a candidate list generatedaccording to pattern 900.

Method 1400 may begin when a decoder begins receiving a bitstream ofcoded data representing a video sequence, for example as a result ofmethod 1300. At step 1401, a bitstream is received at a decoder. Thebitstream comprises a current picture including a sub-picture codedaccording to inter-prediction. The sub-picture includes a current block.At step 1402, the decoder can obtain a flag from a SPS. The flag may bedenoted as a subpic_treated_as_pic_flag[i] where i is an index of thesub-picture. The subpic_treated_as_pic_flag[i] may be set equal to oneto specify that an i-th sub-picture of each coded picture in a CVS istreated as a picture in the decoding process. Such treatment may beexclusive of in-loop filtering operations which may be managed by othermechanisms.

At step 1403, the decoder obtains a plurality of coded blocks. The codedblocks may be included in the same picture as the current block and maybe positioned adjacent to the current block. For example, the codedblocks may be positioned above and/or to the left of the current block.The coded blocks may also include a collocated block. A collocated blockis positioned in a different picture than the current block (e.g., in anadjacent picture). The current block includes a position in the currentpicture, and the collocated block may include the same position in adifferent picture. The coded blocks may all have been previously encodedaccording to inter-prediction prior to step 1403. Hence, the codedblocks contain motion vectors that can be employed as candidate motionvectors for the current block of the sub-picture.

At step 1405, the decoder derives a candidate list of candidate motionvectors for the current block. This is accomplished by excludingcollocated motion vectors from the candidate list that are included inthe collocated block when such collocated motion vectors point outsideof the sub-picture. This approach is employed when the flag from step1402 is set to indicate the sub-picture is treated as a picture.

In some examples, the candidate list of motion vectors for the currentblock is derived according to temporal luma motion vector prediction.The temporal luma motion vector prediction may be performed accordingto:

xColBr=xCb+cbWidth;

yColBr=yCb+cbHeight;

rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?

SubPicRightBoundaryPos:pic_width_in_luma_samples−1; and

botBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?

SubPicBotBoundaryPos:pic_height_in_luma samples−1,

where xColBr and yColBR specify a location of the collocated block, xCband yCb specify a top left sample of the current block relative to a topleft sample of the current picture, cbWidth is a width of the currentblock, cbHeight is a height of the current block, SubPicRightBoundaryPosis a position of a right boundary of the sub-picture,SubPicBotBoundaryPos is a position of a bottom boundary of thesub-picture, pic_width_in_luma samples is a width of the current picturemeasured in luma samples, pic_height_in_luma samples is a height of thecurrent picture measured in luma samples, botBoundaryPos is a computedposition of the bottom boundary of the sub-picture, rightBoundaryPos isa computed position of the right boundary of the sub-picture, SubPicIdxis an index of the sub-picture, and wherein collocated motion vectorsare excluded when yCb>>CtbLog2SizeY is not equal toyColBr>>CtbLog2SizeY, and where CtbLog2SizeY indicates a size of acoding tree block.

At step 1407, the decoder determines a current motion vector for thecurrent block from the candidate list of candidate motion vectors. Forexample, the bitstream may contain a candidate list index indicatingwhich of the candidate motion vectors is the current motion vector. Atstep 1409, the current block is decoded based on the current motionvector. The decoder may then forward the current block for display aspart of a decoded video sequence. In some examples, the current block isa luma block of luma samples. Further, the current motion vector may bea temporal luma motion vector pointing to reference luma samples in areference block. Accordingly, the current block may be decoded based onthe reference luma samples.

FIG. 15 is a schematic diagram of an example system 1500 for coding avideo sequence of images in a bitstream, such as bitstream 1100, byexcluding collocated motion vectors when a sub-picture, such assub-picture 510, is treated as a picture, such as picture 500. System1500 may be implemented by an encoder and a decoder such as a codecsystem 200, an encoder 300, a decoder 400, and/or a video coding device1200. Further, system 1500 may be employed when implementing method 100,1300, and/or 1400 to code a current block 801 and/or 901 according tounidirectional inter-prediction 600 and/or bidirectionalinter-prediction 700 by employing in-loop filter 1000 and/or on acandidate list generated according to pattern 900.

The system 1500 includes a video encoder 1502. The video encoder 1502comprises a partitioning module 1501 for partitioning a video sequenceinto a current picture, the current picture into a sub-picture, and thesub-picture into a current block. The video encoder 1502 furthercomprises a determining module 1503 for determining to encode thecurrent block according to inter-prediction. The video encoder 1502further comprises an obtaining module 1504 for obtaining a plurality ofcoded blocks containing candidate motion vectors for the current blockof the sub-picture, the plurality of coded blocks including a collocatedblock from a different picture than the current picture. The videoencoder 1502 further comprises a deriving module 1505 for deriving acandidate list of candidate motion vectors for the current block byexcluding collocated motion vectors from the candidate list that areincluded in the collocated block and that point outside of thesub-picture when a flag is set to indicate the sub-picture is treated asa picture. The video encoder 1502 further comprises a selecting module1506 for selecting a current motion vector for the current block fromthe candidate list of candidate motion vectors. The video encoder 1502further comprises an encoding module 1507 for encoding the current blockinto a bitstream based on the current motion vector. The video encoder1502 further comprises a storing module 1508 for storing the bitstreamfor communication toward a decoder. The video encoder 1502 furthercomprises a transmitting module 1507 for transmitting the bitstreamtoward video decoder 1510. The video encoder 1502 may be furtherconfigured to perform any of the steps of method 1300.

The system 1500 also includes a video decoder 1510. The video decoder1510 comprises a receiving module 1511 for receiving a bitstreamcomprising a current picture including a sub-picture coded according tointer-prediction slice. The video decoder 1010 further comprises anobtaining module 1512 for obtaining a plurality of coded blockscontaining candidate motion vectors for a current block of thesub-picture, the plurality of coded blocks including a collocated blockfrom a different picture than the current picture. The video decoder1010 further comprises a deriving module 1513 for deriving a candidatelist of candidate motion vectors for the current block by excludingcollocated motion vectors from the candidate list that are included inthe collocated block and that point outside of the sub-picture when aflag is set to indicate the sub-picture is treated as a picture. Thevideo decoder 1010 further comprises a determining module 1514 fordetermining a current motion vector for the current block from thecandidate list of candidate motion vectors. The video decoder 1010further comprises a decoding module 1515 for decoding the current blockbased on the current motion vector. The video decoder 1010 furthercomprises a forwarding module 1516 for forwarding the current block fordisplay as part of a decoded video sequence. The video decoder 1510 maybe further configured to perform any of the steps of method 1400.

A first component is directly coupled to a second component when thereare no intervening components, except for a line, a trace, or anothermedium between the first component and the second component. The firstcomponent is indirectly coupled to the second component when there areintervening components other than a line, a trace, or another mediumbetween the first component and the second component. The term “coupled”and its variants include both directly coupled and indirectly coupled.The use of the term “about” means a range including ±10% of thesubsequent number unless otherwise stated.

It should also be understood that the steps of the exemplary methods setforth herein are not necessarily required to be performed in the orderdescribed, and the order of the steps of such methods should beunderstood to be merely exemplary. Likewise, additional steps may beincluded in such methods, and certain steps may be omitted or combined,in methods consistent with various embodiments of the presentdisclosure.

While several embodiments have been provided in the present disclosure,it may be understood that the disclosed systems and methods might beembodied in many other specific forms without departing from the spiritor scope of the present disclosure. The present examples are to beconsidered as illustrative and not restrictive, and the intention is notto be limited to the details given herein. For example, the variouselements or components may be combined or integrated in another systemor certain features may be omitted, or not implemented.

In addition, techniques, systems, subsystems, and methods described andillustrated in the various embodiments as discrete or separate may becombined or integrated with other systems, components, techniques, ormethods without departing from the scope of the present disclosure.Other examples of changes, substitutions, and alterations areascertainable by one skilled in the art and may be made withoutdeparting from the spirit and scope disclosed herein.

What is claimed is:
 1. A method implemented by a decoder, the methodcomprising: receiving, by a receiver of the decoder, a current pictureincluding a sub-picture with a current block coded in aninter-prediction mode; deriving, by a processor of the decoder, a motionvector predictor candidate list for the current block by excluding acollocated motion vector when the collocated motion vector pointsoutside of the sub-picture and when a flag is set to indicate thesub-picture is treated as a picture, wherein the collocated motionvector is included in a collocated block from a collocated picture;determining, by the processor, a current motion vector for the currentblock from the motion vector predictor candidate list; and decoding, bythe processor, the current block based on the current motion vector. 2.The method of claim 1, further comprising obtaining, by the processor,the flag from a sequence parameter set (SPS), wherein the flag isdenoted as a subpic_treated_as_pic_flag[i], and wherein i is an index ofthe sub-picture.
 3. The method of claim 2, wherein thesubpic_treated_as_pic_flag[i] is set equal to one to specify that ani-th sub-picture of each coded picture in a coded video sequence (CVS)is treated as a picture in a decoding process excluding in-loopfiltering operations.
 4. The method of claim 1, wherein deriving themotion vector predictor candidate list for the current block isperformed according to temporal luma motion vector prediction.
 5. Themethod of claim 4, wherein temporal luma motion vector prediction isperformed according to:xColBr=xCb+cbWidth;yColBr=yCb+cbHeight;rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicRightBoundaryPos: pic_width_in_luma_samples−1; andbotBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicBotBoundaryPos: pic_height_in_luma_samples−1, where xColBr andyColBR specify a location of the collocated block, xCb and yCb specify atop left sample of the current block relative to a top left sample ofthe current picture, cbWidth is a width of the current block, cbHeightis a height of the current block, SubPicRightBoundaryPos is a positionof a right boundary of the sub-picture, SubPicBotBoundaryPos is aposition of a bottom boundary of the sub-picture,pic_widthin_luma_samples is a width of the current picture measured inluma samples, pic_height_in_luma_samples is a height of the currentpicture measured in luma samples, botBoundaryPos is a computed positionof the bottom boundary of the sub-picture, rightBoundaryPos is acomputed position of the right boundary of the sub-picture, SubPicIdx isan index of the sub-picture, and wherein collocated motion vectors areexcluded when yColBR is greater than botBoundaryPos or xColBr is greaterthan rightBoundaryPos.
 6. The method of claim 1, wherein the currentblock is a luma block of luma samples.
 7. The method of claim 1, whereinthe current motion vector is a temporal luma motion vector pointing toreference luma samples in a reference block, and wherein the currentblock is decoded based on the reference luma samples.
 8. A methodimplemented in an encoder, the method comprising: partitioning, by aprocessor of the encoder, a video sequence into a current picture, thecurrent picture into a sub-picture, and the sub-picture into a currentblock; determining, by the processor, to encode the current blockaccording to inter-prediction; obtaining, by the processor, a pluralityof coded blocks containing candidate motion vectors for the currentblock of the sub-picture, the plurality of coded blocks including acollocated block from a different picture than the current picture;deriving, by the processor, a candidate list of candidate motion vectorsfor the current block by excluding collocated motion vectors from thecandidate list when the collocated motion vectors are included in thecollocated block, when the collocated motion vectors point outside ofthe sub-picture, and when a flag is set to indicate the sub-picture istreated as a picture; selecting, by the processor, a current motionvector for the current block from the candidate list of candidate motionvectors; encoding, by the processor, the current block into a bitstreambased on the current motion vector; and storing, by a memory coupled tothe processor, the bitstream for communication toward a decoder.
 9. Themethod of claim 8, further comprising encoding, by the processor, theflag into a sequence parameter set (SPS) in the bitstream, wherein theflag is denoted as a subpic_treated_as_pic_flag[i], and wherein i is anindex of the sub-picture.
 10. The method of claim 9, wherein thesubpic_treated_as_pic_flag[i] is set equal to one to specify that ani-th sub-picture of each coded picture in a coded video sequence (CVS)is treated as a picture in an encoding process exclusive of in-loopfiltering operations.
 11. The method of claim 8, wherein deriving thecandidate list of candidate motion vectors for the current block isperformed according to temporal luma motion vector prediction.
 12. Themethod of claim 11, wherein temporal luma motion vector prediction isperformed according to:xColBr=xCb+cbWidth;yColBr=yCb+cbHeight;rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicRightBoundaryPos: pic_width_in_luma_samples−1; andbotBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicBotBoundaryPos: pic_height_in_luma_samples−1, where xColBr andyColBR specify a location of the collocated block, xCb and yCb specify atop left sample of the current block relative to a top left sample ofthe current picture, cbWidth is a width of the current block, cbHeightis a height of the current block, SubPicRightBoundaryPos is a positionof a right boundary of the sub-picture, SubPicBotBoundaryPos is aposition of a bottom boundary of the sub-picture,pic_widthin_luma_samples is a width of the current picture measured inluma samples, pic_height_in_luma_samples is a height of the currentpicture measured in luma samples, botBoundaryPos is a computed positionof the bottom boundary of the sub-picture, rightBoundaryPos is acomputed position of the right boundary of the sub-picture, SubPicIdx isan index of the sub-picture, and wherein collocated motion vectors areexcluded when yColBR is greater than botBoundaryPos or xColBr is greaterthan rightBoundaryPos.
 13. The method of claim 8, wherein the currentblock is a luma block of luma samples.
 14. The method of claim 8,wherein the current motion vector is a temporal luma motion vectorpointing to reference luma samples in a reference block, and wherein thecurrent block is encoded based on the reference luma samples.
 15. Adecoder comprising: a receiver configured to receive a current pictureincluding a sub-picture with a current block coded in aninter-prediction mode; and a processor coupled to the receiver andconfigured to: derive a motion vector predictor candidate list for thecurrent block by excluding a collocated motion vector when thecollocated motion vector points outside of the sub-picture and when aflag is set to indicate the sub-picture is treated as a picture, whereinthe collocated motion vector is included in a collocated block from acollocated picture; determine a current motion vector for the currentblock from the motion vector predictor candidate list; and decode thecurrent block based on the current motion vector.
 16. The decoder ofclaim 15, wherein the processor is further configured to obtain the flagfrom a sequence parameter set (SPS), and wherein the flag is denoted asa subpic_treated_as_pic_flag[i], and wherein i is an index of thesub-picture.
 17. The decoder of claim 16, wherein thesubpic_treated_as_pic_flag[i] is set equal to one to specify that ani-th sub-picture of each coded picture in a coded video sequence (CVS)is treated as a picture in a decoding process excluding in-loopfiltering operations.
 18. The decoder of claim 17, wherein deriving themotion vector predictor candidate list for the current block isperformed according to temporal luma motion vector prediction.
 19. Thedecoder of claim 18, wherein temporal luma motion vector prediction isperformed according to:xColBr=xCb+cbWidth;yColBr=yCb+cbHeight;rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicRightBoundaryPos: pic_width_in_luma_samples−1; andbotBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicBotBoundaryPos: pic_height_in_luma_samples−1, where xColBr andyColBR specify a location of the collocated block, xCb and yCb specify atop left sample of the current block relative to a top left sample ofthe current picture, cbWidth is a width of the current block, cbHeightis a height of the current block, SubPicRightBoundaryPos is a positionof a right boundary of the sub-picture, SubPicBotBoundaryPos is aposition of a bottom boundary of the sub-picture,pic_widthin_luma_samples is a width of the current picture measured inluma samples, pic_height_in_luma_samples is a height of the currentpicture measured in luma samples, botBoundaryPos is a computed positionof the bottom boundary of the sub-picture, rightBoundaryPos is acomputed position of the right boundary of the sub-picture, SubPicIdx isan index of the sub-picture, and wherein collocated motion vectors areexcluded when yColBR is greater than botBoundaryPos or xColBr is greaterthan rightBoundaryPos.
 20. The decoder of claim 19, wherein the currentblock is a luma block of luma samples.